enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] BUG: tolua verirrt


From: Ronald Lamprecht
Subject: Re: [Enigma-devel] BUG: tolua verirrt
Date: Fri, 08 Dec 2006 18:45:42 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Hi,

Tacvek wrote:
Sidney reported some problems on MacOS. His fix proposal may generate
trouble with the "dist" target. Could you try to analyse his problems:

3) On MacOS there is some difference between gcc and g++ that requires
you to link using g++ if any of the source files are in C++. This causes
the link step of the build of the tools directory to break now that LUA
is C++ because tolua.c and toluabind.c both have '.c' extensions and gcc
was being used. I have attached a patch to configure.ac and
tools/Makefile.am that when the C++ version of LUA is being used creates
an empty file tools/dummy.cc and adds that to the list tolua.c and
toluabind.c to compile and link. The result builds and runs fine on my
Intel MacBook running MacOS 10.4.8.


Hmm... Interesting. I know that on linux it is generally better to use g++ to link c++ .o files than to use gcc. For example it automatically links in the standard c++
library.

I'd be interested in knowing what other differences there are on OS X.
I am concerned about that patch causing problems.
If I recall correctly, _SOURCES is a bit special compaired to the others,
and if possible should not be conditionalized.

Is there a problem with making the dummy.cc non-conditional?
After all, a c++ linker should hapily link a bunch of c .o files.
In fact it would brobably have no net effect, as the linker would
notice that no symbols from the c++ library are actually used, and
thus omit it. Ironically, that solution would have fixed the recent problem,
without requiring the use of CPPFLAGS. It would also let us drop
the LDADD line.

Do you suggest just to add an empty dummy.cc to tolua_SOURCES and the svn trunk/tools what would cause the file to exist for distribution and the compiler/linker to use the desired flags?

Please provide a full patch for us all to test.

I'm also curious about why this problem has not already come up.
When we made CXXLUA default on all platforms, the mac problem should
have appeared.

Sidney reported that he did not compile Enigma for a longer time. But Johannes should have compiled the alpha version on 31 October.

Ronald




reply via email to

[Prev in Thread] Current Thread [Next in Thread]