Skip to contentSkip to conversation

libssp missing from target

Buildroot Grant Edwards 3 participants 7 messages Aug 31, 2010 – Sep 1, 2010

lore
Share & tools
lore
#0 lore raw

I just added a package (systemtap) that uses libssp. I find libssp.so et al. are present in output/staging/lib but missing from output/target/lib. Is there something I need to do in my package makefile to tell buildroot that my package needs libssp to be copied from staging into target?

Signature · 3 lines
Grant Edwards               grant.b.edwards        Yow! My NOSE is NUMB!
                                  at               
                              gmail.com            
#1 lore raw
Quoted 5 lines · Grant Edwards

I just added a package (systemtap) that uses libssp. I find libssp.so et al. are present in output/staging/lib but missing from output/target/lib. Is there something I need to do in my package makefile to tell buildroot that my package needs libssp to be copied from staging into target?

I just enabled building of gdbserver for the target, and now it's missing a libarary on the target as well (libthread_db).

How do I tell buildroot to copy to output/target the libraires required by the binaries in output/target/usr/bin?

Signature · 3 lines
Grant Edwards               grant.b.edwards        Yow! Jesus is my POSTMASTER
                                  at               GENERAL ...
                              gmail.com            
#2 lore raw
Quoted 5 lines · On Tue, 31 Aug 2010 16:20:23 +0000 (UTC) Grant Edwards…

I just enabled building of gdbserver for the target, and now it's missing a libarary on the target as well (libthread_db).

How do I tell buildroot to copy to output/target the libraires required by the binaries in output/target/usr/bin?

Assuming you're using an external toolchain, libthread_db should already be added to the target by the following snippet in toolchain/toolchain-external/ext-tool.mk :

ifneq ($(BR2_PTHREADS_NONE),y)
LIB_EXTERNAL_LIBS+=libpthread.so
ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
LIB_EXTERNAL_LIBS+=libthread_db.so
endif # gdbserver
endif # ! no threads

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw
Quoted 13 lines · Thomas Petazzoni
Quoted 5 lines · On Tue, 31 Aug 2010 16:20:23 +0000 (UTC) Grant Edwards…

I just enabled building of gdbserver for the target, and now it's missing a libarary on the target as well (libthread_db).

How do I tell buildroot to copy to output/target the libraires required by the binaries in output/target/usr/bin?

Assuming you're using an external toolchain, libthread_db should already be added to the target by the following snippet in toolchain/toolchain-external/ext-tool.mk :

Quoted 6 lines

ifneq ($(BR2_PTHREADS_NONE),y)
LIB_EXTERNAL_LIBS+=libpthread.so
ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
LIB_EXTERNAL_LIBS+=libthread_db.so
endif # gdbserver
endif # ! no threads

It appears my ext-tool.mk file is out-of-date. I'll update it to include that bitof code.

Signature · 3 lines
Grant Edwards               grant.b.edwards        Yow! Look!  A ladder!
                                  at               Maybe it leads to heaven,
                              gmail.com            or a sandwich!
#4 lore raw
In reply to Grant Edwards
Quoted 5 lines · On Tue, 31 Aug 2010 14:52:34 +0000 (UTC) Grant Edwards…

I just added a package (systemtap) that uses libssp. I find libssp.so et al. are present in output/staging/lib but missing from output/target/lib. Is there something I need to do in my package makefile to tell buildroot that my package needs libssp to be copied from staging into target?

What is libssp ? Who needs it (besides systemtap) and for what ?

It seems to exist in uClibc toolchains, but not in glibc toolchains.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw
Quoted 10 lines · Thomas Petazzoni
Quoted 5 lines · On Tue, 31 Aug 2010 14:52:34 +0000 (UTC) Grant Edwards…

I just added a package (systemtap) that uses libssp. I find libssp.so et al. are present in output/staging/lib but missing from output/target/lib. Is there something I need to do in my package makefile to tell buildroot that my package needs libssp to be copied from staging into target?

What is libssp?

I don't really know. Here are the text symbols it defines:

__chk_fail
__stack_chk_fail
__stack_chk_fail_local
__gets_chk
__memcpy_chk
__memmove_chk
__mempcpy_chk
__memset_chk
__stpcpy_chk
__strcat_chk
__strcpy_chk
__strncat_chk
__strncpy_chk

My guess is it's some internal uClibc stuff.

Quoted 1 line

Who needs it (besides systemtap)

Nothing that I happen to be building (as far as I know).

Quoted 1 line

and for what?

I don't know. Does it matter?

Quoted 1 line

It seems to exist in uClibc toolchains, but not in glibc toolchains.

OK.

Why not run "ldd" on the binaries in output/target/bin and output/target/usr/bin and just copy whatever libraries they need?

Does buildroot need to know exactly for what a library is used by each binary?

Signature · 3 lines
Grant Edwards               grant.b.edwards        Yow! I want to kill
                                  at               everyone here with a cute
                              gmail.com            colorful Hydrogen Bomb!!
#6 lore raw
In reply to Thomas Petazzoni
Quoted 10 lines · Thomas Petazzoni
Quoted 5 lines · On Tue, 31 Aug 2010 14:52:34 +0000 (UTC) Grant Edwards…

I just added a package (systemtap) that uses libssp. ?I find libssp.so et al. are present in output/staging/lib but missing from output/target/lib. Is there something I need to do in my package makefile to tell buildroot that my package needs libssp to be copied from staging into target?

What is libssp ? Who needs it (besides systemtap) and for what ?

I believe it's part of gcc, used for stack checking.