AmigaPorts / ACE

Amiga C Engine
Mozilla Public License 2.0
154 stars 25 forks source link

Building the Tools on Kubuntu Part 2 #211

Closed pmprog closed 9 months ago

pmprog commented 9 months ago

Hi, sorry, that last commit you did got me further, but I'm now receiving

OS: Kubuntu 22.03 LTS (also KDE neon 5.27) gcc -version reports gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Thanks

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `DecodeLiteralBlockSwitch':
(.text+0x894): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: (.text+0x97b): undefined reference to `_kBrotliContextLookupTable'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `SafeDecodeLiteralBlockSwitch':
(.text+0xb58): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: (.text+0xc0a): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: (.text+0xd42): undefined reference to `_kBrotliContextLookupTable'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `DecodeCommandBlockSwitch':
(.text+0xedc): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `SafeDecodeCommandBlockSwitch':
(.text+0x1155): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: (.text+0x120a): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `DecodeDistanceBlockSwitch':
(.text+0x147c): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `SafeDecodeDistanceBlockSwitch':
(.text+0x1705): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o):(.text+0x17ba): more undefined references to `_kBrotliPrefixCodeRanges' follow
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `ProcessCommands':
(.text+0x3576): undefined reference to `BrotliTransformDictionaryWord'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `SafeProcessCommands':
(.text+0x4111): undefined reference to `BrotliTransformDictionaryWord'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(decode.c.o): in function `BrotliDecoderDecompressStream':
(.text+0x5097): undefined reference to `_kBrotliContextLookupTable'
/usr/bin/ld: (.text+0x53bc): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: (.text+0x5ad6): undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libbrotlidec.a(state.c.o): in function `BrotliDecoderStateInit':
(.text+0x154): undefined reference to `BrotliGetDictionary'
/usr/bin/ld: (.text+0x160): undefined reference to `BrotliGetTransforms'
/usr/bin/ld: (.text+0x17b): undefined reference to `BrotliDefaultAllocFunc'
/usr/bin/ld: (.text+0x182): undefined reference to `BrotliDefaultFreeFunc'
[100%] Built target mod_tool
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/font_conv.dir/build.make:107: /home/user/projects.amiga/ACE/tools/bin/font_conv] Error 1
make[1]: *** [CMakeFiles/Makefile2:159: CMakeFiles/font_conv.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target tileset_conv
make: *** [Makefile:156: all] Error 2
tehKaiN commented 9 months ago

does it help if you build with cmake .. -DFT_DISABLE_BROTLI=ON?

If that doesn't help, try modifying tools/cmakelists.txt from:

CPMAddPackage("gh:fmtlib/fmt#10.0.0")
CPMAddPackage(
    NAME freetype
    VERSION 2.13.0
    GITHUB_REPOSITORY freetype/freetype
    GIT_TAG VER-2-13-0
    OPTIONS "FT_DISABLE_HARFBUZZ 1"
)

to:

CPMAddPackage("gh:fmtlib/fmt#10.0.0")
CPMAddPackage(
    NAME freetype
    VERSION 2.13.0
    GITHUB_REPOSITORY freetype/freetype
    GIT_TAG VER-2-13-0
    OPTIONS "FT_DISABLE_HARFBUZZ 1" "FT_DISABLE_BROTLI 1"
)

Funny that it doesn't show brotli include header errors, and only linking gets stuck 🤔

pmprog commented 9 months ago

Thanks for the reply, yes, using FT_DISABLE_BROTLI compiles fine now.

tehKaiN commented 9 months ago

I've pushed the fix on the master branch.