Jump to content

GCC distro library not found


OldBikerPete

Recommended Posts

I'm using a fairly newly created Armbian_5.25_Orangepizero_Ubuntu_xenial_default_3.4.113

on my orange Pi Zero, trying to port a set of programs from Raspberry Pi where they work OK.

 

I use a script to build:

gcc -o myProgram myProgram.cpp -lwiringPi -llibpthread

 

and my problem is that ld reports that it cannot find libpthread.so.

 

find / -name libpthread.so -print reports that the library is located in

/usr/lib/arm-Linux-gnueabihf/

 

and indeed it is.

 

There is no ld.so.conf file in /etc.

 

so how do I get my program to complete linkage?

 

Peter.

 

PS: I seem to have successfully got the OPi Zero Wifi interface to perform as an access point. I won't be able to confirm this until I can get a program running but a lot of people will be interested if I can confirm and then post my magic incantations!

 

Link to comment
Share on other sites

Correction. I do have ld.so.conf which consists on one line thus:

include /etc/ld.so.conf.d/*.conf

 

and in the referenced folder are two files:

arm-Linux-gnueabihf.conf   and  libc.conf

 

the first of these files consists of two lines thus:

/lib/arm-linux-gnueabihf

/usr/lib/arm-linux-gnueabihf

 

and it is in the second of these folders that libpthread.so resides,

along with libpthread.a  and others.

 

I have tried copying the libraries to the folder in which my program source and the script to compile it resides, tried using the full path of the library, no success.

 

I am also having another problem with the distro which may relate.

'apt upgrade' and 'apt-get upgrade' find that 'linux-libc-dev' can be upgraded but the upgrade fails with bad URL/404 errors.

 

PS.  I have confirmed that my setup of the WiFi access point does work completely and properly - excited!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines