aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: CVS compilation problem in src/MuleDebug.cpp  (Read 3980 times)

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
CVS compilation problem in src/MuleDebug.cpp
« 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:
Code: [Select]
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:
Code: [Select]
--- 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.
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Offline Offline
  • Posts: 1550
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: CVS compilation problem in src/MuleDebug.cpp
« Reply #1 on: November 12, 2005, 01:24:20 AM »

Same here in Debian testing.
Logged
Homefucking is killing prostitution

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: CVS compilation problem in src/MuleDebug.cpp
« Reply #2 on: November 12, 2005, 01:50:56 AM »

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?
« Last Edit: November 12, 2005, 01:52:30 AM by Gerd78 »
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: CVS compilation problem in src/MuleDebug.cpp
« Reply #3 on: November 12, 2005, 05:35:48 AM »

Fixed on current tarball.
Logged

thedude0001

  • evil bugfinder ;)
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 827
Re: CVS compilation problem in src/MuleDebug.cpp
« Reply #4 on: November 12, 2005, 02:30:39 PM »

Quote
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 ;)
Logged
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: CVS compilation problem in src/MuleDebug.cpp
« Reply #5 on: November 12, 2005, 06:13:34 PM »

Quote
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?
Logged

thedude0001

  • evil bugfinder ;)
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 827
Re: CVS compilation problem in src/MuleDebug.cpp
« Reply #6 on: November 12, 2005, 07:40:48 PM »

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 :)
Logged
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: CVS compilation problem in src/MuleDebug.cpp
« Reply #7 on: November 12, 2005, 08:27:49 PM »

Quote
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. ;)
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: CVS compilation problem in src/MuleDebug.cpp
« Reply #8 on: November 12, 2005, 09:52:45 PM »

cvs is for testng anyways, so dont be surpised if it does not compile at all  ;)
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."