Jump to content
The Dark Mod Forums

Alberto Salvia Novella

Member
  • Posts

    160
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Alberto Salvia Novella

  1. Using a custom platform name doesn't prevent the linker to fail.

    The building process I'm following is as explained in the instructions. There should be something missing, either in the instructions or in the source code. Have you tested that (still) builds for you?

    The code I'm using is:

    buildLibs () {
        so "-buildLibs: removeArtefacts" rm --recursive "artefacts"
        yes "yes" | so "-buildLibs: exportCustomRecipes" python "1_export_custom.py"
        so "-buildLibs: compile" conan install . --build --options platform_name="linux"
    }
    
    buildEngine () {
        if [[ ! -d "${buildEngine}" ]]; then
            cp --recursive "${buildWorkspace}" "${buildEngine}..."
            cd "${buildEngine}.../darkmod_src"
            
            so "-buildEngine: cmake" cmake \
                -DCMAKE_BUILD_TYPE="Release" \
                -DTHIRDPARTY_PLATFORM_OVERRIDE="linux" \
                -DCMAKE_EXE_LINKER_FLAGS="-no-pie"
            so "-buildEngine: makeMax" makeMax
            
            mv "${buildEngine}..." "${buildEngine}"
        fi
    }

    Maybe it's related with that "DCMAKE_EXE_LINKER_FLAGS". Without it I got a different error:

    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libavcodec.a(me_cmp.o): relocation R_X86_64_32 against symbol `ff_pb_1' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libavcodec.a(sbrdsp.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libavcodec.a(xvididct.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libavcodec.a(aacpsdsp.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libavutil.a(float_dsp.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswresample.a(audio_convert.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswresample.a(rematrix.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswresample.a(resample.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswscale.a(hscale_fast_bilinear_simd.o): relocation R_X86_64_32S against `.text.unlikely' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswscale.a(swscale.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswscale.a(input.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswscale.a(output.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswscale.a(rgb2rgb.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswscale.a(rgb_2_rgb.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswscale.a(scale.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/ffmpeg/lib/linux/libswscale.a(yuv2rgb.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/TheDarkMod.dir/build.make:8570: thedarkmod.custom] Error 1
    make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/TheDarkMod.dir/all] Error 2
    make: *** [Makefile:91: all] Error 2

     

  2. 16 hours ago, cabalistic said:

    I can ask my ISP about it as that's their infrastructure

    Yes, but still this is an issue in the installer too. The installer must expect the network to fail from time to time. It remembers me of this.

    8 hours ago, stgatilov said:

    I tell you warranted that, at least when using the curl command, if I don't set a timeout to certain servers the connection will hang forever in many situations.

    For example GitHub will hang the connection from time to time to prevent bots from retrieving repository info without using the API. But if I set a timeout and a retry it will always work.

    8 hours ago, stgatilov said:

    Where did you find it?

    Find what?

    8 hours ago, stgatilov said:

    Installer always does that.

    Then anything you change on the ".ini" won't take effect, will it?

    8 hours ago, stgatilov said:

    I think I should tie closing GUI to canceling download in the last page, and simply block the cross icon at all the other moments.

    The least surprising behavior would be that you can close the window at any time. A good enough solution would be that the sub-process continues downloading the current file, and after that it doesn't continue anymore:

    while processIsAlive(parent) && file < len(files) {
    
        downloadFile (files[file])
    
        file++
    
    }

     

  3. The traceroute fails to continue at:

        13  netcup-gw.bbr01.anx84.nue.de.anexia-it.net (144.208.211.31)

    Around 17:25 UTC.

    This looks as a double issue to me. The server is unreachable, and the installed cannot tell.

  4. 🧊 HANGS AT MANIFEST

    For me running the installer with "--unattended" result in a hang from time to time at:

        Downloading "http://tdm.frydrych.org/mirror/zipsync/release/release200/manifest.iniz"...

    It seems to depend on how busy the server is at that moment. After many tries it couldn't work at all, but if you try later it could always work.

     

    🐞 OTHER FLAWS

    Editing the .ini file doesn't work. The installer overwrites it before starting the download.

    Also closing the installer window doesn't interrupt the download process, only the window. The terminal still prints as downloading.

     

    ⏳ NEEDS TO TIMEOUT

    I would check in the code that the connection times-out after a second if it doesn't receive a response. Then it should retry it, for example, 3 times after 30 seconds plus a random number from 0 to 10.

    For example when I use "curl" inside my code, I always do like this:

        curl --silent --connect-timeout 1 --retry 3

    memory_info.txt

  5. I'm writing a recipe to package the game for Linux, and it to work system wide. The recipe compiles everything from source-code, as usually required by Linux distributions for security.

    If I compile as it is, everything is fine. But if I also try to compile the third party libraries by myself, even when they compile successfully, the process fails when linking to openal:

    Quote

    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALu.c.o):(.rodata+0x3bf60): multiple definition of `FuMa2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xf40): first defined here
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALu.c.o):(.rodata+0x3bfa0): multiple definition of `SN3D2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xf80): first defined here
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALu.c.o):(.rodata+0x3bfe0): multiple definition of `N3D2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xfc0): first defined here
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(bformatdec.c.o):(.rodata+0x2e0): multiple definition of `SN3D2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xf80): first defined here
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(bformatdec.c.o):(.rodata+0x320): multiple definition of `N3D2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xfc0): first defined here
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(bformatdec.c.o):(.rodata+0x2a0): multiple definition of `FuMa2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xf40): first defined here
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(panning.c.o):(.rodata+0x1360): multiple definition of `FuMa2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xf40): first defined here
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(panning.c.o):(.rodata+0x13e0): multiple definition of `N3D2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xfc0): first defined here
    /usr/bin/ld: ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(panning.c.o):(.rodata+0x13a0): multiple definition of `SN3D2N3DScale'; ThirdParty/cmake_find_package/../artefacts/openal/lib/lnx64_s_gcc10_rel_stdcpp/libopenal.a(ALc.c.o):(.rodata+0xf80): first defined here
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/TheDarkMod.dir/build.make:8570: thedarkmod.x64] Error 1
    make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/TheDarkMod.dir/all] Error 2
    make: *** [Makefile:91: all] Error 2

    There's also a second problem. "ThirdParty/cmake_find_package/tdm_find_package.cmake" expects gcc to be version 5, but my Linux distribution only offers gcc 10:

    Quote

    if (UNIX)
        if (CMAKE_SIZEOF_VOID_P EQUAL 😎
            set(PACKAGE_PLATFORM "lnx64_s_gcc5_rel_stdcpp")
            set(PACKAGE_PLATFORM_DEBUG "lnx64_s_gcc5_rel_stdcpp")
        else ()
            set(PACKAGE_PLATFORM "lnx32_s_gcc5_rel_stdcpp")
            set(PACKAGE_PLATFORM_DEBUG "lnx32_s_gcc5_rel_stdcpp")
        endif ()

    If I compile libraries by myself, that gcc dir is "gcc10". Although this is easy fixed by substituding the string with:

    Quote

    sed "s|_gcc[0-9]*_|_gcc${gccVersion}_|g" "ThirdParty/cmake_find_package/tdm_find_package.cmake"

     

  6. For my Linux operating system, I have created a recipe for building and packaging the game. So the binaries are compiled from source, for security.

    The thing is that when I load a saved game, I'm told that the revision of the game is zero. Like this:

    zeCBWTs.jpg

    I don't know if that's the intended behavior, of that if you can set the revision while building. As the compilation guide says nothing about it.

×
×
  • Create New...