Closed Gothic-Gargoyle closed 8 months ago
Can you try whether #17146 would have fixed it for you?
No, as this was already contained in the commit (develop-ac2afdc
) i was trying to build.
I found out i did not have the package latomic
installed, so installed that first and tried again,
That did not work, same error as given in bug report.
I found something in a completely unrelated project, they had the same errors so i tried
sudo cmake .. -DCMAKE_SHARED_LINKER_FLAGS=’-latomic’ `
make -j4 -latomic
This also did not work, same error as in the bug report. I also tried
sudo cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_SHARED_LINKER_FLAGS=’-latomic’ -D CMAKE_CXX_FLAGS=-latomic
make -j4 -latomic
This also did not work, same error as in the bug report. Any more ideas?
Note that #17146 was reverted: https://github.com/OpenRCT2/OpenRCT2/pull/17168 and you have to reapply it manually.
Please report back with #17146 reapplied
And don't use sudo
for compilation
Your attempt to pass additional cmake flags failed because you only provided shared linker flags, whilst you actually compiled a static library. You'd have to provide exe longer flags instead, which #17146 already addresses
Note that #17146 was reverted: #17168 and you have to reapply it manually.
Please report back with #17146 reapplied
Adding this back manually on the same line did not fix the issue, instead it caused cmake to fail
Adding it to the end of the file did not do anything, it still gave the same errors.
I also just found out that im on 32bit rasbian 11, is this the reason why it fails?
And don't use sudo for compilation
I do this because i have it in my /srv folder because i intend to host a openrct2 server on this device,
Your attempt to pass additional cmake flags failed because you only provided shared linker flags, whilst you actually compiled a static library. You'd have to provide exe longer flags instead, which https://github.com/OpenRCT2/OpenRCT2/pull/17146 already addresses
i am not too familiar with building without IDEs, this is the first time, apart from compiling openttd, thanks for the info!
Managed to build with
sudo cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
sudo make -j4
it seems it cant be built on rasbian with gcc, but it can be done with clang, maybe add this to the wiki?
I do this because i have it in my /srv folder because i intend to host a openrct2 server on this device,
This is even worse than just compiling it as root for local use. Don't.
You haven't posted the cmake error you got.
Aside from providing the cmake error, can you share what are your clang and GCC versions?
http://archive.raspbian.org/multiarch/dists/bullseye/main/binary-arm64/Packages.xz claims it is clang 10 and GCC 10.2, corroborated by cmake output in the opening post.
I do this because i have it in my /srv folder because i intend to host a openrct2 server on this device,
This is even worse than just compiling it as root for local use. Don't.
You haven't posted the cmake error you got.
Cmake error is:
CMake Error at CMakeLists.txt:278 (target_link_libraries):
Cannot specify link libraries for target "openrct2" which is not built by
this project.
Aside from providing the cmake error, can you share what are your clang and GCC versions?
Clang
Raspbian clang version 11.0.1-2+rpi1
Target: armv6k-unknown-linux-gnueabihf
Thread model: posix
InstalledDir: /usr/bin
GCC:
gcc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@Gothic-Gargoyle Is this still an issue?
I have since switched homeservers so i wouldnt know, i think that it can be closed.
Very well then, if you run into this issue again, feel free to open a new one.
Operating System
Rasbian Bullseye
OpenRCT2 build
OpenRCT2 0.4.3, develop-ac2afdc
Base game
RollerCoaster Tycoon 2
Area(s) with this issue?
Issues building the game
Describe the issue
When compiling OpenRCT2 as prescribed by the guide on the repo's wiki on the Rpi2b, the build fails when linking the game.
Steps to reproduce
Attachments
cmake :
error when linking the game: