Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't link stdlib tests with release compiler on Raspberry Pi 4 32-bit Raspbian #3858

Closed
SeanTAllen opened this issue Sep 17, 2021 · 4 comments
Labels
help wanted Extra attention is needed needs investigation This needs to be looked into before its "ready for work"
Milestone

Comments

@SeanTAllen
Copy link
Member

This is the 32 bit version.

With a release compiler (config=release), I get the following error when I run CC=/usr/bin/cc CXX=/usr/bin/c++ make test-stdlib-release:

Verifying
Writing ./stdlib-release.o
Linking ./stdlib-release
./stdlib-release.o(.text+0x19e6c): error: undefined reference to '__multi3'
./stdlib-release.o(.text+0x1a130): error: undefined reference to '__multi3'
./stdlib-release.o(.text+0x1a444): error: undefined reference to '__multi3'
./stdlib-release.o:stdlib:function .L__unnamed_6311: error: undefined reference to '__multi3'
collect2: error: ld returned 1 exit status
Error:
unable to link: /usr/bin/cc -o ./stdlib-release -O3 -march=native   -fuse-ld=gold ./stdlib-release.o  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libgnustl_shared.so -Wl,--exclude-libs,libunwind.a -lpthread -L"/home/pi/code/ponylang/ponyc/build/release/" -Wl,-rpath,"/home/pi/code/ponylang/ponyc/build/release/" -L"/home/pi/code/ponylang/ponyc/build/release/../../packages" -Wl,-rpath,"/home/pi/code/ponylang/ponyc/build/release/../../packages" -L"." -Wl,-rpath,"." -L"/usr/local/lib" -Wl,-rpath,"/usr/local/lib" -Wl,--start-group -l"rt" -Wl,--end-group   -lponyrt-pic -lm -ldl  -latomic
make: *** [Makefile:197: test-stdlib-release] Error 255

The test-stdlib-debug target links fine.

@SeanTAllen SeanTAllen added help wanted Extra attention is needed bug needs investigation This needs to be looked into before its "ready for work" labels Sep 17, 2021
@SeanTAllen
Copy link
Member Author

My guess would be that an optimization is removing the symbol for some reason when it shouldn't be.

@SeanTAllen
Copy link
Member Author

Turning off the inliner fixes the problem so, that's a clue:

    //pmb.Inliner = createFunctionInliningPass(275);

@SeanTAllen SeanTAllen added this to the Arm support milestone Sep 24, 2021
@SeanTAllen SeanTAllen changed the title Can't link stdlib tests with release compiler on Raspberry Pi 4 Can't link stdlib tests with release compiler on Raspberry Pi 4 32-bit Raspbian Oct 2, 2021
@SeanTAllen
Copy link
Member Author

When this is fixed, the build instructions in BUILD.md introduced in #3879 will need to be adjusted.

@SeanTAllen
Copy link
Member Author

I'm not able to replicate this anymore. I'll update the raspbian 32-bit instructions to not require config=debug.

I'm assuming that when I was working through initial issues that I got into some odd state that resulted in this error.

It looks like at this point the main 32-bit arm issue are the jit tests not working properly and not being able to build with clang.

SeanTAllen added a commit that referenced this issue Oct 9, 2021
We can now build a release compiler and runtime. Nothing that I know
of was fixed, but, I was unable to replicate #3858.
jemc pushed a commit that referenced this issue Oct 9, 2021
We can now build a release compiler and runtime. Nothing that I know
of was fixed, but, I was unable to replicate #3858.
@SeanTAllen SeanTAllen removed the bug label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs investigation This needs to be looked into before its "ready for work"
Projects
None yet
Development

No branches or pull requests

1 participant