Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Library defined but no canonical name

I'm trying to build a project using autotools and getting this error:

$ autoreconf --install
automake: warnings are treated as errors
src/Makefile.am:3: warning: variable 'librombrowser_a_LDFLAGS' is defined but no program or
src/Makefile.am:3: library has 'librombrowser_a' as canonical name (possible typo)
autoreconf: automake failed with exit status: 1

the src/Makefile.am is following:

noinst_LIBRARIES = librombrowser.a
librombrowser_a_CPPFLAGS = $(GTK_CFLAGS)
librombrowser_a_LDFLAGS = $(GTK_LIBS)
librombrowser_a_SOURCES =                                                      \
                          rombrowser-app.c                                     \
                          rombrowser-app.h                                     \
                          rombrowser-cmds-file.c                               \
                          rombrowser-cmds-help.c                               \
                          rombrowser-cmds.h                                    \
                          rombrowser-dirs.c                                    \
                          rombrowser-dirs.h                                    \
                          rombrowser-settings.c                                \
                          rombrowser-settings.h

bin_PROGRAMS = rombrowser
rombrowser_SOURCES = rombrowser.c
rombrowser_LDADD = librombrowser

I'm not seeing what's wrong.

like image 549
Victor Aurélio Avatar asked May 10 '14 00:05

Victor Aurélio


1 Answers

_LDFLAGS isn't valid for a static library, only for an executable or a shared library. You may want _LIBADD instead. It seems to me that the error message could be improved.

like image 167
Tom Tromey Avatar answered Oct 17 '22 14:10

Tom Tromey