Thu 04 Oct 2012 01:55:49 PM UTC, SVN revision 21873:
Fixed compilation broken by having "-lm" as filename as dependency to
lua using components. Retired LUA_AS_DEPENDENCY completely by using
xxx_LIBADD and xxx_LDADD instead of xxx_DEPENDENCIES and xxx_LDFLAGS.
Reported by David Lowe
Patch by Rafa?\197?\130 Mu?\197?\188y?\197?\130o and myself
See gna bug #20095
(Browse SVN revision 21873) |
Thu 04 Oct 2012 01:55:43 PM UTC, SVN revision 21872:
Fixed compilation broken by having "-lm" as filename as dependency to
lua using components. Retired LUA_AS_DEPENDENCY completely by using
xxx_LIBADD and xxx_LDADD instead of xxx_DEPENDENCIES and xxx_LDFLAGS.
Reported by David Lowe
Patch by Rafa?\197?\130 Mu?\197?\188y?\197?\130o and myself
See gna bug #20095
(Browse SVN revision 21872) |
Wed 05 Sep 2012 11:42:28 PM UTC, comment #21:
- As LUA_AS_DEPENDENCY gets obsolete, remove it completely.
Even if TOLUA_AS_DEPENDENCY is not causing actual problems at the moment, it should probably get similar treatment in another ticket.
(file #16480, file #16481)
|
Wed 29 Aug 2012 01:48:13 PM UTC, comment #20:
New bug raised as bug #20109
|
Wed 29 Aug 2012 01:42:54 PM UTC, comment #19:
Thanks Rafał, this last patch works well with S2_4.
|
Wed 29 Aug 2012 02:29:50 AM UTC, comment #18:
On an interesting note, each of these patches seems to make those three lua *_AS_DEPENDENCY vars redundant for their respective trees.
I wonder though: is there any reason (other than not compiling the file twice) for not simply listing client/helpdata.c among freeciv_manual_SOURCES ?
|
Tue 28 Aug 2012 11:27:23 PM UTC, comment #17:
> Although I can't imagine too-old-readline is the issue
Without checking the code, is it properly inside #ifdef HAVE_READLINE (or similar)? While too old readline doesn't sound realistic reason, compiling without readline support could be.
But yes, this belongs to new ticket.
|
Tue 28 Aug 2012 11:21:31 PM UTC, comment #16:
> stdinhand.c:6877: error: ‘rl_completion_suppress_append’ undeclared (first use in this function)
Huh. Can you raise a new ticket for this?
(In it, can you say what version of readline you have? Although I can't imagine too-old-readline is the issue; this feature was added in readline 4.3, released in 2002.)
|
Tue 28 Aug 2012 07:47:10 PM UTC, comment #15:
The last part of my last comment was a bit silly.
I should have said "the new problem is due to the change from patch #3436 and regards readline".
|
Tue 28 Aug 2012 01:59:20 PM UTC, comment #14:
Well, on S2_4 the patch looks differently, mainly due to tree moves and freciv-web.
This one is same revision, for S2_4.
Your new error regards readline.
(file #16448)
|
Tue 28 Aug 2012 01:15:15 PM UTC, comment #13:
Both Marko's and Rafał's patches avoid the error (trunk).
Only Marko's patch apply cleanly to S2_4, and I confirmed that it avoids the error, and that it is possible to launch the server/client and play a turn.
On trunk, however, compilation fails further down so I couldn't do any playtesting. This is probably unrelated, however. The error in this case is:
CC stdinhand.lo
stdinhand.c: In function ‘is_enum_option_value’:
stdinhand.c:6877: error: ‘rl_completion_suppress_append’ undeclared (first use in this function)
stdinhand.c:6877: error: (Each undeclared identifier is reported only once
stdinhand.c:6877: error: for each function it appears in.)
make[3]: *** [stdinhand.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
|
Mon 27 Aug 2012 10:32:45 PM UTC, comment #12:
OK, it's better to write the patch on your own.
This is against trunk r21843.
freeciv-server, freeciv-manual, freeciv-modpack and gtk2/gtk3 clients seems to build correctly with it.
Please test.
(file #16445)
|
Mon 27 Aug 2012 04:02:44 PM UTC, comment #11:
...also passing '-lm' to libtolua_la_LIBADD (if it's actually needed there and not for liblua itself) should make it easier to propagate it down the tree.
|
Mon 27 Aug 2012 03:59:03 PM UTC, comment #10:
What about what I've wrote in comment #7 ?
After all, the reason dependencies were not computed correctly before was exactly that those libs were passed via _LDFLAGS instead of _LDADD.
|
Mon 27 Aug 2012 03:36:24 PM UTC, comment #9:
Fix to not to pollute LUA_AS_DEPENDENCY with "-lm". Note that all places that link against liblua are affected - tolua just happens to be first one.
_LDFLAGS -> _LDADD change was just a test, and I don't think it's even right thing to do (we are not building library of which libm is part).
Original duplicate -lm removal patch is probably wrong too - if libtolua requires libm itself and not just because of liblua, one should not rely on liblua flags to provide it.
(file #16443)
|
Mon 27 Aug 2012 02:59:23 PM UTC, comment #8:
> Also, both LUA_AS_DEPENDENCY and LUA_LIBS carry '-lm'.
Oh, that explains it. LUA_AS_DEPENDENCY expects filenames, not linker options. This actually makes one to wonder why it's not erroring in other environments.
|
Mon 27 Aug 2012 02:57:34 PM UTC, comment #7:
Looking at tolua-5.1/src/bin/Makefile.am again, unless I'm missing something, after changing _LDFLAGS to _LDADD it would seem tolua_DEPENDENCIES are redundant - see if removing it helps.
|
Mon 27 Aug 2012 02:36:31 PM UTC, comment #6:
Perhaps a silly question, but does OS X have a separate libm ?
(IIRC, that's a valid question for i.e. OpenBSD (or was that just about were some of math functions are ?))
Also, both LUA_AS_DEPENDENCY and LUA_LIBS carry '-lm'.
As for the other part, changing _LDFLAGS to _LDADD is actually a more generic bug fix (though perhaps some of those should be moved to libtolua_la_LIBAD in tolua-5.1/src/lib)
(also, it seems that 'massive' log from comment #4 got truncated)
|
Mon 27 Aug 2012 01:50:49 PM UTC, comment #5:
Too massive for Gna, so now here cropped in half.
(file #16440)
|
Mon 27 Aug 2012 01:41:55 PM UTC, comment #4:
Strangely enough, still bailing out with the same message. (And yes, I ran make clean and autogen.sh inbetween...)
Here are a couple of massive logs, if this helps you at all.
(file #16439)
|
Mon 27 Aug 2012 08:01:29 AM UTC, comment #3:
How about also moving them to _LDADD from _LDFLAGS?
(file #16436, file #16437)
|
Mon 27 Aug 2012 02:31:07 AM UTC, comment #2:
I'm having the same problem as David, OS X 10.6.
The patch didn't help in my case, S2_4 and trunk.
|
Sun 26 Aug 2012 10:44:51 PM UTC, comment #1:
Does dropping of duplicate -lm help as in attached patch?
(file #16431, file #16432)
|
Fri 24 Aug 2012 10:42:13 PM UTC, original submission:
...
Making all in tolua-5.1
Making all in src
Making all in lib
CC tolua_event.lo
/bin/sh ../../../../libtool --preserve-dup-deps --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../dependencies/tolua-5.1/include -I../../../../dependencies/lua-5.1/src -I/sw/include -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" -DFC_CONF_PATH="\"/sw/etc/freeciv\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.4:/sw/share/freeciv\"" -DDEFAULT_SAVES_PATH="\"\"" -DDEFAULT_SCENARIO_PATH="\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenarios\"" -Wall -Wpointer-arith -Wcast-align -g -O2 -I/sw/include -pthread -fsigned-char -c -o tolua_event.lo tolua_event.c
CC tolua_is.lo
/bin/sh ../../../../libtool --preserve-dup-deps --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../dependencies/tolua-5.1/include -I../../../../dependencies/lua-5.1/src -I/sw/include -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" -DFC_CONF_PATH="\"/sw/etc/freeciv\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.4:/sw/share/freeciv\"" -DDEFAULT_SAVES_PATH="\"\"" -DDEFAULT_SCENARIO_PATH="\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenarios\"" -Wall -Wpointer-arith -Wcast-align -g -O2 -I/sw/include -pthread -fsigned-char -c -o tolua_is.lo tolua_is.c
CC tolua_map.lo
/bin/sh ../../../../libtool --preserve-dup-deps --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../dependencies/tolua-5.1/include -I../../../../dependencies/lua-5.1/src -I/sw/include -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" -DFC_CONF_PATH="\"/sw/etc/freeciv\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.4:/sw/share/freeciv\"" -DDEFAULT_SAVES_PATH="\"\"" -DDEFAULT_SCENARIO_PATH="\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenarios\"" -Wall -Wpointer-arith -Wcast-align -g -O2 -I/sw/include -pthread -fsigned-char -c -o tolua_map.lo tolua_map.c
CC tolua_push.lo
/bin/sh ../../../../libtool --preserve-dup-deps --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../dependencies/tolua-5.1/include -I../../../../dependencies/lua-5.1/src -I/sw/include -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" -DFC_CONF_PATH="\"/sw/etc/freeciv\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.4:/sw/share/freeciv\"" -DDEFAULT_SAVES_PATH="\"\"" -DDEFAULT_SCENARIO_PATH="\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenarios\"" -Wall -Wpointer-arith -Wcast-align -g -O2 -I/sw/include -pthread -fsigned-char -c -o tolua_push.lo tolua_push.c
CC tolua_to.lo
/bin/sh ../../../../libtool --preserve-dup-deps --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../dependencies/tolua-5.1/include -I../../../../dependencies/lua-5.1/src -I/sw/include -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" -DFC_CONF_PATH="\"/sw/etc/freeciv\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.4:/sw/share/freeciv\"" -DDEFAULT_SAVES_PATH="\"\"" -DDEFAULT_SCENARIO_PATH="\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenarios\"" -Wall -Wpointer-arith -Wcast-align -g -O2 -I/sw/include -pthread -fsigned-char -c -o tolua_to.lo tolua_to.c
CCLD libtolua.la
Making all in bin
CC tolua.o
gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../dependencies/lua-5.1/src -I../../../../dependencies/tolua-5.1/include -I/sw/include -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" -DFC_CONF_PATH="\"/sw/etc/freeciv\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.4:/sw/share/freeciv\"" -DDEFAULT_SAVES_PATH="\"\"" -DDEFAULT_SCENARIO_PATH="\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenarios\"" -Wall -Wpointer-arith -Wcast-align -g -O2 -I/sw/include -pthread -fsigned-char -c tolua.c
CC toluabind.o
gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../dependencies/lua-5.1/src -I../../../../dependencies/tolua-5.1/include -I/sw/include -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" -DFC_CONF_PATH="\"/sw/etc/freeciv\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.4:/sw/share/freeciv\"" -DDEFAULT_SAVES_PATH="\"\"" -DDEFAULT_SCENARIO_PATH="\".:data/scenarios:~/.freeciv/2.4/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenarios\"" -Wall -Wpointer-arith -Wcast-align -g -O2 -I/sw/include -pthread -fsigned-char -c toluabind.c
make[5]: *** No rule to make target `-lm', needed by `tolua'. Stop.
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
------------------------------------------------------------
Details: OSX 10.7.4, XCode 4.4.1
$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~28/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~28/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Just for good measure, i turned off parallel builds but it made no difference. Apparently the deal breaker is the "No rule to make target `-lm', needed by `tolua'."
|