Build failure: undefined symbol check_version(...)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Build failure: undefined symbol check_version(...)

AndrewJanke
Hi, Octave folks,

I'm compiling Octave on macOS 10.13.5 and running into a build failure.

   CXXLD    libinterp/dldfcn/__delaunayn__.la
Undefined symbols for architecture x86_64:
   "check_version(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&)", referenced from:
       _G__delaunayn__ in __delaunayn___la-__delaunayn__.o
   "err_disabled_feature(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
referenced from:
       F__delaunayn__(octave_value_list const&, int) in
__delaunayn___la-__delaunayn__.o
   "octave_dld_function::create(octave_value_list (*)(octave_value_list
const&, int), octave::dynamic_library const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
referenced from:
       _G__delaunayn__ in __delaunayn___la-__delaunayn__.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [libinterp/dldfcn/__delaunayn__.la] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Does anyone know what might be causing this?

(And does anyone know how to turn on a verbose build so I can see the
exact command which is failing? 'make VERBOSE=1' doesn't seem to do
anything.)

I can see what looks like a matching check_version(std::string,
std::string) definition in libinterp/corefcn/defun.cc. I wonder why it's
not being linked?

I'm using the latest sources from the Hg repository.

Configuring using the following:

$ cat my_configure
./configure \
   --prefix=/tmp/test-octave \
   --disable-readline \
   --without-fltk \
   --without-x \
   --without-qhull

Cheers,
Andrew


Reply | Threaded
Open this post in threaded view
|

Re: Build failure: undefined symbol check_version(...)

Carlo de Falco-2


> On 1 Jul 2018, at 08:22, Andrew Janke <[hidden email]> wrote:
>
> (And does anyone know how to turn on a verbose build so I can see the exact command which is failing?

use

make V=1

see here [1] for more details.

c.

[1] https://autotools.io/automake/silent.html



Reply | Threaded
Open this post in threaded view
|

Re: Build failure: undefined symbol check_version(...)

Carlo de Falco-2
In reply to this post by AndrewJanke


> On 1 Jul 2018, at 08:22, Andrew Janke <[hidden email]> wrote:
>
> (And does anyone know how to turn on a verbose build so I can see the exact command which is failing?

use

make V=1

see here [1] for more details.

c.

[1] https://autotools.io/automake/silent.html



Reply | Threaded
Open this post in threaded view
|

Re: Build failure: undefined symbol check_version(...)

AndrewJanke
In reply to this post by Carlo de Falco-2

On 7/1/18 2:51 AM, Carlo De Falco wrote:

>
>> On 1 Jul 2018, at 08:22, Andrew Janke <[hidden email]> wrote:
>>
>> (And does anyone know how to turn on a verbose build so I can see the exact command which is failing?
> use
>
> make V=1
>
> see here [1] for more details.
>
> c.
>
> [1] https://autotools.io/automake/silent.html
>
Thanks, Carlo. That worked.

Here's the verbose output of the failing build step, in case that helps
diagnose things:

$ make V=1
rm -f bits/stl_algo.h
/Applications/Xcode-9.4.app/Contents/Developer/usr/bin/make all-recursive
Making all in libgnu
/Applications/Xcode-9.4.app/Contents/Developer/usr/bin/make all-recursive
make[4]: Nothing to be done for `all-am'.
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -std=gnu++11 -fPIC
-D_THREAD_SAFE -pthread -Wall -W -Wshadow -Wold-style-cast -Wformat
-Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual  -g -O2
-avoid-version -module -no-undefined     -o
libinterp/dldfcn/__delaunayn__.la -rpath
/tmp/test-octave/lib/octave/5.0.0
libinterp/dldfcn/__delaunayn___la-__delaunayn__.lo   -lm
libtool: link: g++ -std=gnu++11  -o
libinterp/dldfcn/.libs/__delaunayn__.so -bundle
libinterp/dldfcn/.libs/__delaunayn___la-__delaunayn__.o   -lm -pthread
-g -O2   -pthread
Undefined symbols for architecture x86_64:
   "check_version(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&)", referenced from:
       _G__delaunayn__ in __delaunayn___la-__delaunayn__.o
   "err_disabled_feature(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
referenced from:
       F__delaunayn__(octave_value_list const&, int) in
__delaunayn___la-__delaunayn__.o
   "octave_dld_function::create(octave_value_list (*)(octave_value_list
const&, int), octave::dynamic_library const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
referenced from:
       _G__delaunayn__ in __delaunayn___la-__delaunayn__.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [libinterp/dldfcn/__delaunayn__.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I don't see any libinterp* or liboctinterp* libs referenced there; I'm
guessing that's where the stuff from libinterp/corefcn/defun.cc would
need to be pulled in from.

[~/local/repos/octave-BUILD-static]
$ for i in */*/.libs/*.o; do nm $i | grep check_ver | grep T; if [[ $?
== 0 ]]; then echo "That was $i"; fi; done ✘ 1
0000000000000230 T
__Z13check_versionRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES7_
That was libinterp/corefcn/.libs/libcorefcn_la-defun.o
[~/local/repos/octave-BUILD-static]
$ grep libcorefcn_la-defun **/*.lo
libinterp/corefcn/libcorefcn_la-defun.lo:#
libinterp/corefcn/libcorefcn_la-defun.lo - a libtool object file
libinterp/corefcn/libcorefcn_la-defun.lo:pic_object='.libs/libcorefcn_la-defun.o'


Cheers,
Andrew


Reply | Threaded
Open this post in threaded view
|

Re: Build failure: undefined symbol check_version(...)

AndrewJanke


On 7/1/18 3:32 AM, Andrew Janke wrote:

>
> Undefined symbols for architecture x86_64:
>   "check_version(std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&,
> std::__1::basic_string<char, std::__1::char_traits<char>,
> std::__1::allocator<char> > const&)", referenced from:
>       _G__delaunayn__ in __delaunayn___la-__delaunayn__.o
>   "err_disabled_feature(std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&,
> std::__1::basic_string<char, std::__1::char_traits<char>,
> std::__1::allocator<char> > const&, std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
> referenced from:
>       F__delaunayn__(octave_value_list const&, int) in
> __delaunayn___la-__delaunayn__.o
>   "octave_dld_function::create(octave_value_list (*)(octave_value_list
> const&, int), octave::dynamic_library const&,
> std::__1::basic_string<char, std::__1::char_traits<char>,
> std::__1::allocator<char> > const&, std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
> referenced from:
>       _G__delaunayn__ in __delaunayn___la-__delaunayn__.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[2]: *** [libinterp/dldfcn/__delaunayn__.la] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> I don't see any libinterp* or liboctinterp* libs referenced there; I'm
> guessing that's where the stuff from libinterp/corefcn/defun.cc would
> need to be pulled in from.
>

Looks like this is an issue introduced since 4.4.0: I'm able to build
4.4.0 okay, but building from the tip of the Hg repo breaks like this.

Looks like it might be related to
http://hg.savannah.gnu.org/hgweb/octave/rev/fa66d81d0956, introduced
pursuant to https://savannah.gnu.org/bugs/index.php?53627. Commenting there.

Cheers,
Andrew