Skip to contentSkip to conversation

Musicbrainz

DISCUSSION Stuart Gray 3 participants 6 messages Aug 22, 2009 – Aug 25, 2009

lore
Share & tools
lore
#0 lore raw

hi,

Has any one successfully compiled libmusicbrainz_3.0.2.

I have this compiling but it fails at the linking stage as it cannot find the library libstdc++.so.6.

I have tried various EXTRA_OEMAKE, OECONF, OECMAKE, but none will add the option to the linking stage. Can anyone give me some pointers.

| /home/stuart/overo-oe/tmp/cross/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld:
warning: libstdc++.so.6, needed by ../src/libmusicbrainz3.so.6.2.0, not
found (try using -rpath or -rpath-link)
| ../src/libmusicbrainz3.so.6.2.0: undefined reference to
`__cxa_allocate_exception@CXXABI_1.3'
| ../src/libmusicbrainz3.so.6.2.0: undefined reference to
`__gnu_cxx::__exchange_and_add(int volatile*, int)@GLIBCXX_3.4'
| ../src/libmusicbrainz3.so.6.2.0: undefined reference to
`std::basic_string<char, std::char_traits<char>, std::allocator<char>

Quoted 1 line

::rfind(char, unsigned int) const@GLIBCXX_3.4'

| ../src/libmusicbrainz3.so.6.2.0: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char>

Quoted 1 line

::assign(std::basic_string<char, std::char_traits<char>,

std::allocator<char> > const&)@GLIBCXX_3.4'

I thoungth this should the place where I could add the linrary

oe_soinstall() {
    # Purpose: Install shared library file and
    #          create the necessary links
    # Example:
    #
    # oe_
    #
    #oenote installing shared library $1 to $2
    #
    libname=`basename $1`
    install -m 755 $1 $2/$libname
    sonamelink=`arm-angstrom-linux-gnueabi-readelf -d $1 |grep 'Library

soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
solink=echo $libname | sed -e 's/\.so\..*/.so/' ln -sf $libname $2/$sonamelink
ln -sf $libname $2/$solink

}

Please let me know if this is the correct way to proceed.

Thanks,
Stuart

#1 lore raw
Quoted 9 lines · On Saturday 22 August 2009 12:00:54 Stuart Gray wrote:

hi,

Has any one successfully compiled libmusicbrainz_3.0.2.

I have this compiling but it fails at the linking stage as it cannot find the library libstdc++.so.6.

I have tried various EXTRA_OEMAKE, OECONF, OECMAKE, but none will add the option to the linking stage. Can anyone give me some pointers.

Hey Stuart,

please stop cross-posting. My emails bounce from the gumstix mailinglist and this is not fun...

With the limited information I have I would propose to:
- Link with g++ instead of gcc
- Or link to -lsupc++ (e.g. you change ammend the TARGET_LDFLAGS)

z.

#2 lore raw

I have included the full log files for the compilation with my bb file.

I am fairly new to Linux and OE, but from the run_compile log file I thought I should be adding an include which points to the libstdc++.so.6.

I have the OE User Manual and I am continually reading through the sections to find a solution. I tried to append the TARGET_LDFLAGS, but it was not very successful, it looked like it could not find the compiler.

Thanks for any further guidance you can give.
Stuart

2009/8/23 Holger Hans Peter Freyther
<[email protected]<holger%[email protected]>

Quoted 30 lines · On Saturday 22 August 2009 12:00:54 Stuart Gray wrote:
Quoted 9 lines

hi,

Has any one successfully compiled libmusicbrainz_3.0.2.

I have this compiling but it fails at the linking stage as it cannot find the library libstdc++.so.6.

I have tried various EXTRA_OEMAKE, OECONF, OECMAKE, but none will add the option to the linking stage. Can anyone give me some pointers.

Hey Stuart,

please stop cross-posting. My emails bounce from the gumstix mailinglist and
this is not fun...

With the limited information I have I would propose to:
- Link with g++ instead of gcc
- Or link to -lsupc++ (e.g. you change ammend the TARGET_LDFLAGS)

z.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#3 lore raw

I've fixed it.

I added oe_soinstall and pulled the so file in for compilation.

Cheers,
Stuart

2009/8/24 Stuart Gray <[email protected]>

Quoted 47 lines

I have included the full log files for the compilation with my bb file.

I am fairly new to Linux and OE, but from the run_compile log file I thought I should be adding an include which points to the libstdc++.so.6.

I have the OE User Manual and I am continually reading through the sections to find a solution. I tried to append the TARGET_LDFLAGS, but it was not very successful, it looked like it could not find the compiler.

Thanks for any further guidance you can give.
Stuart

2009/8/23 Holger Hans Peter Freyther <[email protected]<holger%[email protected]>

Quoted 1 line
Quoted 29 lines · On Saturday 22 August 2009 12:00:54 Stuart Gray wrote:
Quoted 5 lines

hi,

Has any one successfully compiled libmusicbrainz_3.0.2.

I have this compiling but it fails at the linking stage as it cannot

find

Quoted 3 lines

the library libstdc++.so.6.

I have tried various EXTRA_OEMAKE, OECONF, OECMAKE, but none will add

the

Quoted 1 line

option to the linking stage. Can anyone give me some pointers.

Hey Stuart,

please stop cross-posting. My emails bounce from the gumstix mailinglist and
this is not fun...

With the limited information I have I would propose to:
- Link with g++ instead of gcc
- Or link to -lsupc++ (e.g. you change ammend the TARGET_LDFLAGS)

z.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#4 lore raw
Quoted 3 lines · On Monday 24 August 2009 11:59:31 Stuart Gray wrote:

I've fixed it.

I added oe_soinstall and pulled the so file in for compilation.

Yes, and it is a messy fix. I have pushed musicbrainz_3.0.2 to OE and use another -rpath-link to point it to the libstdc++.

One more detail... gcc 4.3/binutils are "leaking" c++ symbols and when building the C application, gcc is used for the linking and it is not able to find the c++ library. I'm manually pointing gcc to the path of this library now.

z.

#5 lore raw
Quoted 5 lines · Holger Hans Peter Freyther
Quoted 3 lines · On Monday 24 August 2009 11:59:31 Stuart Gray wrote:

I've fixed it.

I added oe_soinstall and pulled the so file in for compilation.

Quoted 8 lines

Yes, and it is a messy fix. I have pushed musicbrainz_3.0.2 to OE and use another -rpath-link to point it to the libstdc++.

One more detail... gcc 4.3/binutils are "leaking" c++ symbols and when building the C application, gcc is used for the linking and it is not able to find the c++ library. I'm manually pointing gcc to the path of this library now.

Use AC_PROG_CXX or set LD to g++, that usually fixes it.

regards,

Koen