[Bug 2035094] Re: On rpi400/AARCH64 it doesn't search for user defined libraries in the selected folders.
Dave Jones
2035094 at bugs.launchpad.net
Tue Sep 12 09:36:07 UTC 2023
Can you attach your program.c so I can attempt a reproduction here?
Also, you mention the system was upgraded - can you recall which version
you upgraded from? (I'll attempt reproduction on a fresh system, but if
that fails, I can set up an upgraded variant to see if there's a
significant difference).
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/2035094
Title:
On rpi400/AARCH64 it doesn't search for user defined libraries in the
selected folders.
Status in gcc-defaults package in Ubuntu:
New
Bug description:
$ neofetch
OS: Ubuntu MATE 22.04.3 LTS aarch64
Host: Raspberry Pi 400 Rev 1.0
Kernel: 5.15.0-1036-raspi
$ lsb_release -rd
Description: Ubuntu 22.04.3 LTS
Release: 22.04
$ apt-cache policy gcc
gcc:
Installed: 4:11.2.0-1ubuntu1
Candidate: 4:11.2.0-1ubuntu1
Version table:
*** 4:11.2.0-1ubuntu1 500
500 http://ports.ubuntu.com jammy/main arm64 Packages
100 /var/lib/dpkg/status
$ ls /usr/lib/aarch64-linux-gnu/libSDL2*
/usr/lib/aarch64-linux-gnu/libSDL2-2.0.so
/usr/lib/aarch64-linux-gnu/libSDL2-2.0.so.0
/usr/lib/aarch64-linux-gnu/libSDL2-2.0.so.0.18.2
/usr/lib/aarch64-linux-gnu/libSDL2.a
/usr/lib/aarch64-linux-gnu/libSDL2main.a
/usr/lib/aarch64-linux-gnu/libSDL2.so
/usr/lib/aarch64-linux-gnu/libSDL2_test.a
Expected:
$ gcc -O2 $(pkg-config --cflags --libs sdl2) program.c -o program && echo $?
0
$ gcc -O2 -c $(pkg-config --cflags --libs sdl2) program.c -o program.o && echo $?
0
$ gcc -O2 $(pkg-config --libs sdl2) program.o -o program && echo $?
0
$ ld.gold $(pkg-config --libs sdl2) program.o -o program && echo $?
0
$ ld.bfd $(pkg-config --libs sdl2) program.o -o program && echo $?
ld.bfd: warning: cannot find entry symbol _start; defaulting to 00000000004002e0
0
$ ld $(pkg-config --libs sdl2) program.o -o program && echo $?
ld.bfd: warning: cannot find entry symbol _start; defaulting to 00000000004002e0
0
What happened:
$ gcc -O2 $(pkg-config --cflags --libs sdl2) program.c -o program && echo $?
(...) ld exit 1
1
$ gcc -O2 -c $(pkg-config --cflags sdl2) program.c -o program.o && echo $?
0
$ gcc -O2 $(pkg-config --libs sdl2) program.o -o program && echo $?
(...) ld exit 1
1
$ gcc -O2 -L/usr/lib/aarch64-linux-gnu $(pkg-config --libs sdl2) program.o -o program && echo $?
(...) ld exit 1
1
$ strace gcc -O2 -L/usr/lib/aarch64-linux-gnu $(pkg-config --libs sdl2) program.o -o program && echo $?
(...) does an faccess to see if dir exists and can be acceessed, never tries to list a directory or ever access any form of libSDL2.0.so
$ clang -O2 $(pkg-config --libs --cflags sdl2) program.c -o program && echo $?
0
$ ld.gold $(pkg-config --libs sdl2) program.o -o program && echo $?
0
$ ld.bfd $(pkg-config --libs sdl2) program.o -o program && echo $?
ld.bfd: warning: cannot find entry symbol _start; defaulting to 00000000004002e0
0
This also fails with gcc-12, it might be affecting g++ and g++-12
package
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gcc 4:11.2.0-1ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-1036.39-raspi 5.15.111
Uname: Linux 5.15.0-1036-raspi aarch64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: arm64
CasperMD5CheckResult: unknown
CurrentDesktop: MATE
Date: Mon Sep 11 13:50:14 2023
ImageMediaBuild: 20220703
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/2035094/+subscriptions
More information about the foundations-bugs
mailing list