Opened 2 years ago

Closed 2 years ago

#14942 closed build error (fixed)

PC-BSD 9.1 build error: undefined reference to backtrace()

Reported by: Ishayahu Owned by:
Priority: normal Milestone:
Component: build Version: 2.9.4
Keywords: PC-BSD9.1 Cc:
Blocked By: Blocking:
Patch: no

Description

I tryed install wxWidgets 2.9.4 under PC-BSD9.1 x64 Isotope Edition and get this error:

/usr/bin/install -c /usr/home/ishayahu/Downloads/wxWidgets-2.9.4/lib/libwx_gtk2u_gl-2.9.so.4.0.0 /usr/local/lib
(cd /usr/local/lib ; rm -f  libwx_gtk2u_gl-2.9.so  libwx_gtk2u_gl-2.9.so.4;  ln -s  libwx_gtk2u_gl-2.9.so.4.0.0  libwx_gtk2u_gl-2.9.so.4;  ln -s  libwx_gtk2u_gl-2.9.so.4  libwx_gtk2u_gl-2.9.so)
(if test -f utils/wxrc/Makefile ; then cd utils/wxrc && make all ; fi)
/usr/home/ishayahu/Downloads/wxWidgets-2.9.4/bk-deps g++ -c -o wxrc_wxrc.o -D__WXGTK__        -I. -DWXUSINGDLL -DwxUSE_GUI=0 -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/usr/home/ishayahu/Downloads/wxWidgets-2.9.4/lib/wx/include/gtk2-unicode-2.9 -I../../include -I/usr/local/include/gtk-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -D_THREAD_SAFE -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/libpng15 -I/usr/local/include/pango-1.0 -I/usr/local/include/freetype2 -I/usr/local/include -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/gstreamer-0.10 -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include  -DWX_PRECOMP -pthread -D_THREAD_SAFE -O2 -fno-strict-aliasing -I/usr/local/include/gtk-unix-print-2.0 -I/usr/local/include/gtk-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -D_THREAD_SAFE -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/libpng15 -I/usr/local/include/pango-1.0 -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/freetype2 -I/usr/local/include -fvisibility=hidden -fvisibility-inlines-hidden ./wxrc.cpp
g++ -o wxrc wxrc_wxrc.o    -L/usr/home/ishayahu/Downloads/wxWidgets-2.9.4/lib  -pthread   -L/usr/local/lib  -lwx_baseu_xml-2.9  -lwx_baseu-2.9     -lwxregexu-2.9 -lwxexpat-2.9 -pthread   -L/usr/local/lib  -Wl,--version-script,/usr/home/ishayahu/Downloads/wxWidgets-2.9.4/version-script -lz -liconv -lm -lz -liconv -lm
/usr/home/ishayahu/Downloads/wxWidgets-2.9.4/lib/libwx_baseu-2.9.so: undefined reference to `backtrace_symbols'
/usr/home/ishayahu/Downloads/wxWidgets-2.9.4/lib/libwx_baseu-2.9.so: undefined reference to `backtrace'
*** [wxrc] Error code 1

Stop in /usr/home/ishayahu/Downloads/wxWidgets-2.9.4/utils/wxrc.
*** [wxrc] Error code 1

Stop in /usr/home/ishayahu/Downloads/wxWidgets-2.9.4.

Attachments (1)

config.log download (203.9 KB) - added by Ishayahu 2 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 2 years ago by vadz

  • Summary changed from PC-BSD 9.1 build error wxWidgets-2.9.4/lib/libwx_baseu-2.9.so: undefined reference to `backtrace_symbols' to PC-BSD 9.1 build error: undefined reference to backtrace()

What did configure say about backtrace()? If you don't have its output in front of you any more, please search for this function name in config.log, what's the result of the check for it?

If it succeeded, then it looks like your system headers declare this function but don't define it in the C library. This is IMO a bug on its own and should be reported. But in the meanwhile the fix is probably as simple as replacing AC_TRY_COMPILE used in the check for backtrace() in configure.in with AC_TRY_LINK. Could you please do this change, then rerun autoconf to regenerate configure and rerun configure itself and build again? If it fixes the problem, I'd apply this change.

TIA!

Changed 2 years ago by Ishayahu

comment:2 Changed 2 years ago by Ishayahu

I'm not familiar with C, so I tryed to find something like "AC_TRY_COMPILE used in the check for backtrace() in configure.in" but I can't ) So if you can replace it and give me a new file or if you can say wich line do you mean - I'll do the rest.

comment:3 Changed 2 years ago by vadz

Please apply the following patch:

  • configure.in

    diff --git a/configure.in b/configure.in
    index b1c305a..5bb5458 100644
    a b if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then 
    43674367    AC_CACHE_CHECK([for backtrace() in <execinfo.h>], wx_cv_func_backtrace, 
    43684368        [ 
    43694369            AC_LANG_PUSH(C++) 
    4370             AC_TRY_COMPILE([#include <execinfo.h>], 
     4370            AC_TRY_LINK([#include <execinfo.h>], 
    43714371                [ 
    43724372                    void *trace[1]; 
    43734373                    char **messages; 

then run "autoconf", "rm config.cache", configure and make.

comment:4 Changed 2 years ago by pcor

This is the same as #9783, which I fixed in r62657. But I now see my fix was immediately overwritten by Robert in r62660, who was, as usual, not paying attention to what he was doing. I will re-apply r62657.

comment:5 follow-up: Changed 2 years ago by PC

  • Resolution set to fixed
  • Status changed from new to closed

(In [73333]) look for backtrace() in -lexecinfo, fixes #14942

comment:6 in reply to: ↑ 5 Changed 2 years ago by Ishayahu

Replying to PC:

(In [73333]) look for backtrace() in -lexecinfo, fixes #14942

it doesn't solve the problem in my case(( I'm still have the same error

comment:7 Changed 2 years ago by Ishayahu

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:8 follow-up: Changed 2 years ago by vadz

  • Status changed from reopened to infoneeded_new

Did you rerun configure? Did it add libexecinfo to the list of libraries correctly, i.e. do you see it in the output when you run "make wxbase"?

comment:9 in reply to: ↑ 8 Changed 2 years ago by Ishayahu

  • Status changed from infoneeded_new to new

Replying to vadz:

Did you rerun configure? Did it add libexecinfo to the list of libraries correctly, i.e. do you see it in the output when you run "make wxbase"?

I deleted old dir and exctracted source one more time, configured it and runed "make install clean". If I run "make wxbase" - I don't get any output.

comment:10 Changed 2 years ago by vadz

  • Status changed from new to infoneeded_new

Sorry, I don't understand. Which sources did you extract? You need to be using svn or git in order to have the latest changes from r73333. The usual mode of operations is:

  1. Check out the sources using svn or git (preferred) into some directory. This directory is called "srcdir".
  2. Create another directory for building. This directory is called "builddir".
  3. Run configure from the builddir, e.g. cd $builddir; $srcdir/configure ... and then make wxbase there.

If the last step still results in any errors, please post them.

comment:11 Changed 2 years ago by Ishayahu

  • Resolution set to fixed
  • Status changed from infoneeded_new to closed

ok, sorry, now all works)

Note: See TracTickets for help on using tickets.