aMule Forum
English => Compilation problems => Topic started by: Gerd78 on November 11, 2005, 07:38:25 PM
-
Hi,
I can't compile src/MuleDebug.cpp without HAVE_BFD anymore. The following error occurs in CVS-20051111, but did not occur in CVS-20051110:
if g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -Os -I../.. -I../../../src -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -DwxUSE_GUI=0 -I/usr/include/libpng12 -DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -DWITH_LIBPNG -DEC_REMOTE -DWEBSERVERDIR="\"/usr/share/amule/webserver\"" -Os -DUSE_EMBEDDED_CRYPTO -MT amuleweb-MuleDebug.o -MD -MP -MF ".deps/amuleweb-MuleDebug.Tpo" -c -o amuleweb-MuleDebug.o `test -f '../../../src/MuleDebug.cpp' || echo './'`../../../src/MuleDebug.cpp; \
then mv -f ".deps/amuleweb-MuleDebug.Tpo" ".deps/amuleweb-MuleDebug.Po"; else rm -f ".deps/amuleweb-MuleDebug.Tpo"; exit 1; fi
../../../src/MuleDebug.cpp: In function ‘wxString get_backtrace(unsigned int)’:
../../../src/MuleDebug.cpp:402: error: ‘wxExecute’ was not declared in this scope
make[5]: *** [amuleweb-MuleDebug.o] Fehler 1
These are the changes that were done in src/MuleDebug.cpp between CVS-20051110 and CVS-20051111:
--- amule-cvs.old/src/MuleDebug.cpp 2005-10-16 01:43:47.000000000 +0200
+++ amule-cvs.new/src/MuleDebug.cpp 2005-11-10 16:34:53.000000000 +0100
@@ -39,9 +39,6 @@
#include
#include
#include
- #if wxUSE_GUI
- #include
- #endif
#include // Seems to be needed at least on Creteil's box
#endif
@@ -402,11 +399,8 @@
// the even elements are the function names, and the odd elements
// are the line numbers.
-#if wxUSE_GUI
- ::wxEnableTopLevelWindows(false);
hasLineNumberInfo = wxExecute(command, out) != -1;
- ::wxEnableTopLevelWindows(true);
-#endif /* wxUSE_GUI */
+
}
#endif /* HAVE_BFD / !HAVE_BFD */
This error occurs when building "amuleweb". At least "alc", "alcc", "cas" and "wxcas" are built successfully.
I consider this as a bug because ./configure checks for bfd.h and passes if it doesn't find it. If HAVE_BFD is optional, compilation should not fail and if it's mandatory, ./configure should terminate if bfd.h cannot be found.
My configuration:
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--disable-debug \
--enable-monolithic \
--enable-amule-daemon \
--enable-amulecmd \
--enable-amulecmdgui \
--enable-webserver \
--enable-webservergui \
--enable-amule-gui \
--enable-cas \
--enable-wxcas \
--enable-ed2k \
--enable-alc \
--enable-alcc \
--enable-systray \
--enable-embedded-crypto
I tried the following flags:
CFLAGS=-Os
CXXFLAGS=-Os
CFLAGS=-O2 -g -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 (SuSE's default RPM_OPT_FLAGS)
CXXFLAGS=-O2 -g -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 (SuSE's default RPM_OPT_FLAGS)
no CFLAGS at all
no CXXFLAGS at all
My configuration:
SuSE 10.0
GCC 4.0.2
GTK+ 2.8.3
wxGTK 2.6.1
BTW: If you wonder why I disabled HAVE_BFD: It's a pain for creating portable binaries because libbfd has an SONAME that changes with every minor binutils release.
-
Same here in Debian testing.
-
I tried to undo the patch from my last posting, but it doesn't work. The mentioned error does not occur anymore and amuleweb compiles, but then it fails to link. I don't have the error message right now, but I can reproduce it if it helps.
In the meantime I solved the problem by re-enabling HAVE_BFD and linking libbfd statically (static linking is better anyway for libbfd - SuSE has libbfd.so and libbfd.a, but most other distros only have libbfd.a, e.g. Fedora and Mandriva), but I think it's still a problem: Do all supported platforms have bfd.h at all?
-
Fixed on current tarball.
-
Originally posted by Gerd78
Do all supported platforms have bfd.h at all?
I'd say yes, but it usually isn't installed by default, waiting for you in a package like binutils-dev or -devel ;)
-
I'd say yes, but it usually isn't installed by default, waiting for you in a package like binutils-dev or -devel ;)
Also on the supported non-Linux unices?
-
Err, got me there, no idea. Since we were talking about distros I didn't turn my "other OS's" switch on :)
Anyway, the whole situation was basically caused by a bug which should be fixed by now :)
-
Originally posted by thedude0001
Anyway, the whole situation was basically caused by a bug which should be fixed by now :)
Yes, it is. Works fine in CVS-20051112. ;)
-
cvs is for testng anyways, so dont be surpised if it does not compile at all ;)