Skip to content

Arch Linux build issues (patched) #11

@hugoaboud

Description

@hugoaboud

I've had some issues building the library with GCC on Arch Linux 2020, so I've updated the build script to patch some source files and use the zlib and boost installed by pacman.
I've also patched it to use wxWidgets version 3.0 and Python 3.8

  1. -stdlib=libstdc++
    As mentioned here, this flag causes compiling issues with GCC. The patch removes all entries on CMakeLists.txt files.

  2. Board -fPIC
    When compiling with BUILD_PYTHON, there was an issue "relocation R_X86_64_PC32 against symbol can not be used when making a shared object" with Board. The patch adds the -fPIC to the cmake command for this library. Thought I'm not sure it affects the code.

  3. zlib, zlib_d
    The zlib installed by pacman is linked with -lz. The patch fixes the names on CMakeLists.txt files.

  4. typedef void *gzFile
    On the current zlib version, this is typedef struct gzFile_s *gzFile. The patch changes it on tinyxmlplus.h.

  5. SaveFileGZ() not saving, SaveFile() normal
    For some reason, the "9wb+" option with the current zlib::gzopen won't create a file. I found that taking the + out it works. The patch changes it to "9wb" on tinyxmlplus.cpp.

  6. shared_ptr ambiguous
    Some shared_ptr across the source are missing the boost:: namespace. The patch fixes all files it finds.

  7. mutex ambiguous
    Some mutex across the source are missing the boost:: namespace. The patch fixes all files it finds.

  8. GtpInputStream::GetLine
    The compiler needs an explicit cast from istream to bool, so the patch changes the return to return (bool) getline(m_in, line) on fuego-0.4/gtpengine/GtpInputStream.cpp.

  9. SgGameReader::GetIntProp
    The compiler needs an explicit cast from istringstream to bool, so the patch changes the return to return (bool) in; on fuego-0.4/smartgame/SgGtpClient.cpp.

  10. boost -mt-d, -mt
    I don't really know why these flags are added to the boost library names, I guess it's related to the boost that's part of the repo. The patch removes them, and also removes the '-' character after each boost lib name.

  11. wxOPEN, wxFILE_MUST_EXIST, wxSAVE
    As mentioned here these have changed respectively to wxFD_OPEN, wxFD_FILE_MUST_EXIST and wxFD_SAVE.

  12. OnlyGaussianHiddenNodes 0.0
    This one took me a while to figure out, but the .dat file I was using as template didn't have this parameter, so the experiment would randomly crash.

Here is the patch shell script, it might be helpful for someone. (rename to .sh)

I'm using it as a lib for my software, so I can't tell if all the methods and experiments are working, especially the ones about Checkers/Go. But it's worth the try.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions