Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-08

Cannot find -lpthread

11 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, I'm trying to build fpc and lazarus from sources in XUbuntu 14.04. While trying to link fpc I get this:

/usr/bin/ld: aviso: link.res contiene secciones de salida. ?Olvid? -T? /usr/bin/ld: no se puede encontrar -lpthread
/usr/bin/ld: no se puede encontrar -ldl
/usr/bin/ld: no se puede encontrar -lc
fpmake.pp(44,1) Error: Error while linking

Does anyone know which package I'm missing? I've installed build-essential and libpthread-stubs0, but it still cannot find pthread...

Regards,

Reply by email

Henry Vermaak
to Leonardo M. Ramé
"Leonardo M. Ram?" wrote 8 lines
Hi, I'm trying to build fpc and lazarus from sources in XUbuntu 14.04. While trying to link fpc I get this: /usr/bin/ld: aviso: link.res contiene secciones de salida. ?Olvid? -T? /usr/bin/ld: no se puede encontrar -lpthread /usr/bin/ld: no se puede encontrar -ldl /usr/bin/ld: no se puede encontrar -lc fpmake.pp(44,1) Error: Error while linking

These are generally in libc6-dev, but that should be pulled in by build-essential.

Try installing apt-file and using:

apt-file search libpthread.so

Henry

Reply by email

Henry Vermaak
to Henry Vermaak
Henry Vermaak wrote 16 lines
On Thu, Aug 21, 2014 at 12:22:45PM -0300, "Leonardo M. Ram?" wrote: > Hi, I'm trying to build fpc and lazarus from sources in XUbuntu > 14.04. While trying to link fpc I get this: > > /usr/bin/ld: aviso: link.res contiene secciones de salida. ?Olvid? -T? > /usr/bin/ld: no se puede encontrar -lpthread > /usr/bin/ld: no se puede encontrar -ldl > /usr/bin/ld: no se puede encontrar -lc > fpmake.pp(44,1) Error: Error while linking These are generally in libc6-dev, but that should be pulled in by build-essential. Try installing apt-file and using: apt-file search libpthread.so

P.S. If you already have the files, you may need to update the ld cache:

sudo ldconfig

Reply by email

Leonardo M. Ramé
to Henry Vermaak: These are generally in libc6-dev, but that should be pulled in by build-essential. Try…

El 21/08/14 a las 12:34, Henry Vermaak escibi?:

Show quoted text 25 lines
On Thu, Aug 21, 2014 at 12:22:45PM -0300, "Leonardo M. Ram?" wrote: > Hi, I'm trying to build fpc and lazarus from sources in XUbuntu > 14.04. While trying to link fpc I get this: > > /usr/bin/ld: aviso: link.res contiene secciones de salida. ?Olvid? -T? > /usr/bin/ld: no se puede encontrar -lpthread > /usr/bin/ld: no se puede encontrar -ldl > /usr/bin/ld: no se puede encontrar -lc > fpmake.pp(44,1) Error: Error while linking These are generally in libc6-dev, but that should be pulled in by build-essential. Try installing apt-file and using: apt-file search libpthread.so Henry -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Here's the result, apparently it is already installed:

libc6: /lib/x86_64-linux-gnu/libpthread.so.0
libc6-arm64-cross: /usr/aarch64-linux-gnu/lib/libpthread.so.0 libc6-armel-armhf-cross: /usr/arm-linux-gnueabihf/libsf/libpthread.so.0 libc6-armel-cross: /usr/arm-linux-gnueabi/lib/libpthread.so.0 libc6-armhf-armel-cross: /usr/arm-linux-gnueabi/libhf/libpthread.so.0 libc6-armhf-cross: /usr/arm-linux-gnueabihf/lib/libpthread.so.0 libc6-dev: /usr/lib/x86_64-linux-gnu/libpthread.so libc6-dev-arm64-cross: /usr/aarch64-linux-gnu/lib/libpthread.so libc6-dev-armel-armhf-cross: /usr/arm-linux-gnueabihf/libs/libpthread.so libc6-dev-armel-cross: /usr/arm-linux-gnueabi/lib/libpthread.so libc6-dev-armhf-armel-cross: /usr/arm-linux-gnueabi/libhf/libpthread.so libc6-dev-armhf-cross: /usr/arm-linux-gnueabihf/lib/libpthread.so libc6-dev-i386: /usr/lib32/libpthread.so
libc6-dev-powerpc-cross: /usr/powerpc-linux-gnu/lib/libpthread.so libc6-dev-ppc64-powerpc-cross: /usr/powerpc-linux-gnu/lib6/libpthread.so libc6-dev-ppc64el-cross: /usr/powerpc64le-linux-gnu/lib/libpthread.so libc6-dev-x32: /usr/libx32/libpthread.so
libc6-i386: /lib32/libpthread.so.0
libc6-powerpc-cross: /usr/powerpc-linux-gnu/lib/libpthread.so.0 libc6-ppc64-powerpc-cross: /usr/powerpc-linux-gnu/lib64/libpthread.so.0 libc6-ppc64el-cross: /usr/powerpc64le-linux-gnu/lib/libpthread.so.0 libc6-x32: /libx32/libpthread.so.0

Any hint?

Reply by email

Henry Vermaak
to Leonardo M. Ramé
"Leonardo M. Ram?" wrote 24 lines
Here's the result, apparently it is already installed: libc6: /lib/x86_64-linux-gnu/libpthread.so.0 libc6-arm64-cross: /usr/aarch64-linux-gnu/lib/libpthread.so.0 libc6-armel-armhf-cross: /usr/arm-linux-gnueabihf/libsf/libpthread.so.0 libc6-armel-cross: /usr/arm-linux-gnueabi/lib/libpthread.so.0 libc6-armhf-armel-cross: /usr/arm-linux-gnueabi/libhf/libpthread.so.0 libc6-armhf-cross: /usr/arm-linux-gnueabihf/lib/libpthread.so.0 libc6-dev: /usr/lib/x86_64-linux-gnu/libpthread.so libc6-dev-arm64-cross: /usr/aarch64-linux-gnu/lib/libpthread.so libc6-dev-armel-armhf-cross: /usr/arm-linux-gnueabihf/libs/libpthread.so libc6-dev-armel-cross: /usr/arm-linux-gnueabi/lib/libpthread.so libc6-dev-armhf-armel-cross: /usr/arm-linux-gnueabi/libhf/libpthread.so libc6-dev-armhf-cross: /usr/arm-linux-gnueabihf/lib/libpthread.so libc6-dev-i386: /usr/lib32/libpthread.so libc6-dev-powerpc-cross: /usr/powerpc-linux-gnu/lib/libpthread.so libc6-dev-ppc64-powerpc-cross: /usr/powerpc-linux-gnu/lib6/libpthread.so libc6-dev-ppc64el-cross: /usr/powerpc64le-linux-gnu/lib/libpthread.so libc6-dev-x32: /usr/libx32/libpthread.so libc6-i386: /lib32/libpthread.so.0 libc6-powerpc-cross: /usr/powerpc-linux-gnu/lib/libpthread.so.0 libc6-ppc64-powerpc-cross: /usr/powerpc-linux-gnu/lib64/libpthread.so.0 libc6-ppc64el-cross: /usr/powerpc64le-linux-gnu/lib/libpthread.so.0 libc6-x32: /libx32/libpthread.so.0

apt-file searches all available packages in the repo, which is why it's useful to find which package you need to install to get a specific file. You'll have to check with your package manager (or just use locate).

Henry

Reply by email

Péter Gábor
to Leonardo M. Ramé: El 21/08/14 a las 12:34, Henry Vermaak escibi?: Here's the result, apparently it is…

Hello!

If you try static linking with a library you need the development package of it which contains the required binary
statements/codes/records for the static linking.
For example: libpthread-stubs0-dev or libpthread-dev or something similar...

2014-08-21 17:38 keltez?ssel, "Leonardo M. Ram?" ?rta:

Show quoted text 55 lines
El 21/08/14 a las 12:34, Henry Vermaak escibi?: > On Thu, Aug 21, 2014 at 12:22:45PM -0300, "Leonardo M. Ram?" wrote: >> Hi, I'm trying to build fpc and lazarus from sources in XUbuntu >> 14.04. While trying to link fpc I get this: >> >> /usr/bin/ld: aviso: link.res contiene secciones de salida. ?Olvid? -T? >> /usr/bin/ld: no se puede encontrar -lpthread >> /usr/bin/ld: no se puede encontrar -ldl >> /usr/bin/ld: no se puede encontrar -lc >> fpmake.pp(44,1) Error: Error while linking > > These are generally in libc6-dev, but that should be pulled in by > build-essential. > > Try installing apt-file and using: > > apt-file search libpthread.so > > Henry > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > Here's the result, apparently it is already installed: libc6: /lib/x86_64-linux-gnu/libpthread.so.0 libc6-arm64-cross: /usr/aarch64-linux-gnu/lib/libpthread.so.0 libc6-armel-armhf-cross: /usr/arm-linux-gnueabihf/libsf/libpthread.so.0 libc6-armel-cross: /usr/arm-linux-gnueabi/lib/libpthread.so.0 libc6-armhf-armel-cross: /usr/arm-linux-gnueabi/libhf/libpthread.so.0 libc6-armhf-cross: /usr/arm-linux-gnueabihf/lib/libpthread.so.0 libc6-dev: /usr/lib/x86_64-linux-gnu/libpthread.so libc6-dev-arm64-cross: /usr/aarch64-linux-gnu/lib/libpthread.so libc6-dev-armel-armhf-cross: /usr/arm-linux-gnueabihf/libs/libpthread.so libc6-dev-armel-cross: /usr/arm-linux-gnueabi/lib/libpthread.so libc6-dev-armhf-armel-cross: /usr/arm-linux-gnueabi/libhf/libpthread.so libc6-dev-armhf-cross: /usr/arm-linux-gnueabihf/lib/libpthread.so libc6-dev-i386: /usr/lib32/libpthread.so libc6-dev-powerpc-cross: /usr/powerpc-linux-gnu/lib/libpthread.so libc6-dev-ppc64-powerpc-cross: /usr/powerpc-linux-gnu/lib6/libpthread.so libc6-dev-ppc64el-cross: /usr/powerpc64le-linux-gnu/lib/libpthread.so libc6-dev-x32: /usr/libx32/libpthread.so libc6-i386: /lib32/libpthread.so.0 libc6-powerpc-cross: /usr/powerpc-linux-gnu/lib/libpthread.so.0 libc6-ppc64-powerpc-cross: /usr/powerpc-linux-gnu/lib64/libpthread.so.0 libc6-ppc64el-cross: /usr/powerpc64le-linux-gnu/lib/libpthread.so.0 libc6-x32: /libx32/libpthread.so.0 Any hint?
P?ter G?bor

Reply by email

Leonardo M. Ramé
to Péter Gábor

El 21/08/14 a las 14:44, P?ter G?bor escibi?:

Show quoted text 7 lines
Hello! If you try static linking with a library you need the development package of it which contains the required binary statements/codes/records for the static linking. For example: libpthread-stubs0-dev or libpthread-dev or something similar...

Yes I have installed libpthread-stubs0-dev (libpthread-dev does not exists here), but the error persists. I need to know what is that "something similar" package needed by fpc...

Reply by email

Henry Vermaak
to Leonardo M. Ramé
"Leonardo M. Ram?" wrote 12 lines
El 21/08/14 a las 14:44, P?ter G?bor escibi?: >Hello! > >If you try static linking with a library you need the development >package of it which contains the required binary >statements/codes/records for the static linking. >For example: libpthread-stubs0-dev or libpthread-dev or something similar... > Yes I have installed libpthread-stubs0-dev (libpthread-dev does not exists here), but the error persists. I need to know what is that "something similar" package needed by fpc...

The pthread stubs package won't help you. Where is libpthread.so on your system? Back in the early days of multilib I had to add a search path to fpc with -XR, but that's worked for a long time now.

Henry

Reply by email

Péter Gábor
to Leonardo M. Ramé: El 21/08/14 a las 14:44, P?ter G?bor escibi?: Yes I have installed libpthread-stubs0-dev…

When I wrote "something similar" I meant the names to be similar.

Also try to find pthread related files with the following command (start it with sudo to avoid "access denied" messages):

find / -iname libpthread*

Read the output: binary files intended for development usage (eg. static linking) has .a on the end of their names. The .a files must be in a directory where FPC can find them...
You may need to extend the library search path in your fpc.cfg with the appropriate path.

2014-08-21 20:52 keltez?ssel, "Leonardo M. Ram?" ?rta:

Show quoted text 14 lines
El 21/08/14 a las 14:44, P?ter G?bor escibi?: > Hello! > > If you try static linking with a library you need the development > package of it which contains the required binary > statements/codes/records for the static linking. > For example: libpthread-stubs0-dev or libpthread-dev or something > similar... > Yes I have installed libpthread-stubs0-dev (libpthread-dev does not exists here), but the error persists. I need to know what is that "something similar" package needed by fpc...
P?ter G?bor

Reply by email

Joost van der Sluis
to Leonardo M. Ramé: Hi, I'm trying to build fpc and lazarus from sources in XUbuntu 14.04. While trying to…
"Leonardo M. Ram?" wrote 9 lines
/usr/bin/ld: aviso: link.res contiene secciones de salida. ?Olvid? -T? /usr/bin/ld: no se puede encontrar -lpthread /usr/bin/ld: no se puede encontrar -ldl /usr/bin/ld: no se puede encontrar -lc fpmake.pp(44,1) Error: Error while linking Does anyone know which package I'm missing? I've installed build-essential and libpthread-stubs0, but it still cannot find pthread...

It can not even find libc. On my system (Fedora) that means that I have to install glibc-devel.

But did you try to build fpc without threading in fpmake?

make clean all OPT=-dNO_THREADING

Or without using TPocess:

make clean all NO_UNIT_PROCESS=1

Or without TProcess and the unit zipper:

make clean all NO_UNIT_PROCESS=1 NO_UNIT_ZIPPER=1

You still need libc and pthreads though to compile Lazarus...

Joost.

Reply by email