Tiny Core Base > Corepure64

gcc refuses to find libgomp.spec

(1/1)

CardealRusso:
hi

when trying to pass -fopenmp to gcc it spits:
gcc: fatal error: cannot read spec file ‘libgomp.spec’: No such file or directory
despite being present in /usr/local/lib (it's part of gcc_libs-dev.tcz)

“-L/usr/local/lib -lgomp” works but needs to pass some arguments to the compiler

it would help a lot to know the destination that gcc is looking for in order to be able to link to it.

CardealRusso:
nvm, got it with sudo ln -s /usr/local/lib/libgomp.spec /lib/x86_64-pc-linux-gnu/13.2.0/libgomp.spec (need sudo mkdir -p /lib/x86_64-pc-linux-gnu/13.2.0/)

strace -e trace=access gcc -fopenmp -o hello hello.c results: (he looks everywhere but local)

--- Code: ---access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/13.2.0/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../x86_64-pc-linux-gnu/lib/../lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../x86_64-pc-linux-gnu/13.2.0/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/lib/x86_64-pc-linux-gnu/13.2.0/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/lib/../lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/x86_64-pc-linux-gnu/13.2.0/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/../lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../x86_64-pc-linux-gnu/lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/lib/libgomp.spec", R_OK)       = -1 ENOENT (No such file or directory)
access("/usr/lib/libgomp.spec", R_OK)   = -1 ENOENT (No such file or directory)

--- End code ---

Rich:
Hi CardealRusso

--- Quote from: CardealRusso on December 12, 2024, 08:55:27 AM --- ... (he looks everywhere but local)

--- Code: --- ----- Snip -----
access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
 ----- Snip -----
--- End code ---

--- End quote ---
It looks like it is checking local, but it's checking local in the gcc extension.
The above simplfies to:

--- Code: ---/tmp/tcloop/gcc/usr/local/lib/libgomp.spec
--- End code ---
But libgomp.spec is provided by gcc_libs-dev.tcz

CNK:
I had this trouble when making the links-full.tcz extension for x86_64 and fixed it (according to my notes) by adding "-B/usr/local/lib" to CFLAGS and CXXFLAGS:

--- Code: ---export CFLAGS="-mtune=generic -Os -pipe -B/usr/local/lib" CXXFLAGS="-mtune=generic -Os -pipe -B/usr/local/lib" LDFLAGS="-Wl,-O1"

--- End code ---

Juanito:
If you symlink libgomp.spec to /usr/lib for the purposes of building an app, the app will find libgomp in /usr/local/lib once built.

Navigation

[0] Message Index

Go to full version