HarbourMasters / Shipwright

3.27k stars 490 forks source link

Compilation errors on Arch Linux. #3333

Open Vulto opened 1 year ago

Vulto commented 1 year ago

Fresh downloaded repo, followed the compilation instructions for Linux and have several errors and warnings.

log.txt

Alto1772 commented 1 year ago

/home/mainuser/Downloads/forN64/Kingship/soh/src/boot/idle.c:80:20: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'void *' [-Wint-conversion]

I understand the problem here... You are using the Clang compiler instead of GCC, which it doesn't like implicit void * cast conversions. Try to revert back to using GCC instead...

Vulto commented 1 year ago

Changed to GCC, the code compiles fine! Thank you! If not using -j4 it crashes. If i use -j12 (wich i usually do in othe projects), my pc crashes and i'm forced to reboot. This program is really cpu intense. I don't understand why.

fossifousacid commented 11 months ago

@Vulto Are you sure it's not OOMing? I know if I run it on my laptop it uses almost all 10GB of RAM just with -j4.

Vulto commented 11 months ago

@Vulto Are you sure it's not OOMing? I know if I run it on my laptop it uses almost all 10GB of RAM just with -j4.

Yeah it is

Running with -j1 takes forever to compile but it does. So you're right.

I wonder why it uses so much ram. I'm able to compile many other decomped games with -j4 just fine. Thank you for the reply.

ThisNekoGuy commented 6 months ago

When building against release 8.0.5 with Clang+LLVM (on LLVM-based Gentoo), I get 10 build errors in the second step. All of which are between hash_range_32.hpp and hash_32.hpp

GenerateSohOtr.log <== (Has an error message but doesn't fail)

. . .
[410/410] Generating soh.otr...
Generating Custom OTR Archive...
[2024-05-17 23:32:23.066] [error] [Archive.cpp:428] The directory soh.otr does not exist
Adding portVersion file.
. . .

build.log <== Where cmake fails

Reproduction:

git clone https://github.com/HarbourMasters/Shipwright.git
cd Shipwright
git fetch --tags
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
git checkout $LATEST_TAG
unset LATEST_TAG
git submodule update --init

cmake -H. -Bbuild-cmake -GNinja \
    -DCMAKE_BUILD_TYPE:STRING=Release \
    -DCMAKE_C_COMPILER=$(which clang) \
    -DCMAKE_CXX_COMPILER=$(which clang++) \
    -DCMAKE_CPP_COMPILER=$(which clang-cpp) \
    -DCMAKE_AR=$(which llvm-ar) \
    -DCMAKE_NM=$(which llvm-nm) \
    -DCMAKE_AS=$(which llvm-as) \
    -DCMAKE_RANLIB=$(which llvm-ranlib) \
    -DCMAKE_OBJDUMP=$(which llvm-objdump) \
    -DCMAKE_OBJCOPY=$(which llvm-objcopy) \
    -DCMAKE_READELF=$(which llvm-readelf) \
    -DCMAKE_ADDR2LINE=$(which llvm-addr2line) \
    -DCMAKE_STRIP=$(which llvm-strip)

cmake --build build-cmake --target GenerateSohOtr | tee GenerateSohOtr.log
cmake --build build-cmake --config Release | tee build.log
Archez commented 6 months ago

When building against release 8.0.5 with Clang+LLVM (on LLVM-based Gentoo), I get 10 build errors in the second step. All of which are between hash_range_32.hpp and hash_32.hpp

The boost issue has been addressed post 8.0.5. You will want to try building the latest commit from develop-MacReady

ThisNekoGuy commented 6 months ago

Ah, I see; now the issue is with int-conversions, too. :/ build.log