You are not logged in.

#1 2025-04-13 07:22:35

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 75

[SOLVED]cmake linker ld.gold permission error[Hedgewars-server]

Hello, I've been trying to create a split pkg for the game hedgewars in a clean chroot(using classic method), notably for hedgewars-server which requires a lot of haskell dependencies and I can build it almost, until at the last linking permission error: Here's the full build log, the pkgbuild and the cmakelist.txt for it, is there a cmake switch I should be enabling? I can't use sudo because I can't input the non-existent password.

PS: The primary hedgewars pkg doesn't have cmake commands inputted yet I know, the pkgbuild is not finished yet, but right now I just want to resolve this linker permission error. Thank you.

The cmake error:

[27 of 27] Linking /hedgewars-server
/usr/bin/ld.gold: fatal error: /hedgewars-server: open: Permission denied
collect2: error: ld returned 1 exit status
ghc-9.4.8: `gcc' failed in phase `Linker'. (Exit code: 1)
make[2]: *** [CMakeFiles/hedgewars-server.dir/build.make:96: /hedgewars-server] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/hedgewars-server.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
make: Leaving directory '/build/hedgewars/src/hedgewars-src-1.0.2/hedgewars-server'
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /home/admin2/Downloads/hedgewars-main/hwchroot/admin2/build

Last edited by Erwin Iosef (2025-04-13 18:35:37)

Offline

#2 2025-04-13 10:08:54

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,528

Re: [SOLVED]cmake linker ld.gold permission error[Hedgewars-server]

The link you posted only works when logged in to your pastebin.com account .
Also pastebin.com is not popular here, please use another pastebin site .
See https://wiki.archlinux.org/title/List_o … n_services for alternatives

Last edited by Lone_Wolf (2025-04-13 10:09:15)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2025-04-13 10:52:53

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 75

Re: [SOLVED]cmake linker ld.gold permission error[Hedgewars-server]

Lone_Wolf, I've corrected the link, it should work now, and thank you for the pastebin alternatives link, will look into it.

Offline

#4 2025-04-13 18:35:15

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 75

Re: [SOLVED]cmake linker ld.gold permission error[Hedgewars-server]

Never mind I fixed it myself, turns out the EXECUTABLE_OUTPUT_PATH in the CMakeLists isn't defined and thus DESTINATION points to /bin in the chroot directory instead of the $srcdir. Marking as solved.

Offline

Board footer

Powered by FluxBB