Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Boost to 1.87.0 #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

o01eg
Copy link
Contributor

@o01eg o01eg commented Dec 28, 2024

No description provided.

@o01eg
Copy link
Contributor Author

o01eg commented Dec 28, 2024

Test build https://github.com/o01eg/freeorion/actions/runs/12525177244/job/34936467814 have same error with MSVS project as previous version.

@o01eg o01eg force-pushed the bump-boost-1.87.0 branch from e9dc88b to 8ee7abc Compare December 28, 2024 10:23
@geoffthemedio
Copy link
Member

@o01eg o01eg force-pushed the bump-boost-1.87.0 branch from 8ee7abc to 4cd2d3d Compare December 29, 2024 11:36
@o01eg o01eg force-pushed the bump-boost-1.87.0 branch from 4cd2d3d to 4277c16 Compare December 29, 2024 12:21
@o01eg
Copy link
Contributor Author

o01eg commented Dec 29, 2024

If it works on MacOS, maybe also release it's as 15th SDK release? @Vezzra @geoffthemedio

Vezzra
Vezzra previously requested changes Dec 29, 2024
Copy link
Member

@Vezzra Vezzra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can build the SDK, can build FO, but FO crashes on startup dumping this to the console:

$ ./FreeOrion
dyld[12619]: Library not loaded: '@rpath/libboost_random.dylib'
  Referenced from: '/Volumes/FreeOrion/FreeOrion.app/Contents/SharedSupport/libboost_iostreams.dylib'
  Reason: tried: '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../SharedSupport/libboost_random.dylib' (no such file), '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../SharedSupport/libboost_random.dylib' (no such file), '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../Frameworks/libboost_random.dylib' (no such file), '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../SharedSupport/libboost_random.dylib' (no such file), '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../Frameworks/libboost_random.dylib' (no such file), '/usr/local/lib/libboost_random.dylib' (no such file), '/usr/lib/libboost_random.dylib' (no such file)Library not loaded: '@rpath/libboost_graph.dylib'
  Referenced from: '/Volumes/FreeOrion/FreeOrion.app/Contents/SharedSupport/libboost_python39.dylib'
  Reason: tried: '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../SharedSupport/libboost_graph.dylib' (no such file), '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../SharedSupport/libboost_graph.dylib' (no such file), '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../Frameworks/libboost_graph.dylib' (no such file), '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../SharedSupport/libboost_graph.dylib' (no such file), '/Volumes/FreeOrion/FreeOrion.app/Contents/MacOS/../Frameworks/libboost_graph.dylib' (no such file), '/usr/local/lib/libboost_graph.dylib' (no such file), '/usr/lib/libboost_graph.dylib' (no such file)
Abort trap: 6

@Vezzra
Copy link
Member

Vezzra commented Dec 29, 2024

If it works on MacOS, maybe also release it's as 15th SDK release? @Vezzra @geoffthemedio

Once it works on Mac, sure, why not.

@o01eg
Copy link
Contributor Author

o01eg commented Dec 29, 2024

I suppose it should be fixed with

find_package(Boost ${MINIMUM_BOOST_VERSION}
    COMPONENTS
...
        random
        graph
    REQUIRED)
...
        COMMAND
           ${CMAKE_COMMAND} -E copy_if_different "${Boost_RANDOM_LIBRARY}" "$<TARGET_FILE_DIR:freeorion>/../SharedSupport"
        COMMAND
           ${CMAKE_COMMAND} -E copy_if_different "${Boost_GRAPH_LIBRARY}" "$<TARGET_FILE_DIR:freeorion>/../SharedSupport"

in CMakeLists.txt in FreeOrion

@o01eg o01eg requested a review from Vezzra December 29, 2024 14:22
@Vezzra
Copy link
Member

Vezzra commented Dec 29, 2024

Ok, this is getting odd. When I add these lines to CMakeLists.txt, building FO fails with this error in the build log:

PhaseScriptExecution CMake\ PostBuild\ Rules /Users/user/SoftwareProjekte/FO/main/build/FreeOrion.build/Release/freeorion.build/Script-91AD46CA2CDFF15F2E45B2CB.sh (in target 'freeorion' from project 'FreeOrion')
    cd /Users/user/SoftwareProjekte/FO/main/src
    /bin/sh -c /Users/user/SoftwareProjekte/FO/main/build/FreeOrion.build/Release/freeorion.build/Script-91AD46CA2CDFF15F2E45B2CB.sh
CMake Error: cmake version 3.24.2
Usage: /Applications/CMake.app/Contents/bin/cmake -E <command> [arguments...]
Available commands: 
  capabilities              - Report capabilities built into cmake in JSON format
  cat [--] <files>...       - concat the files and print them to the standard output
  chdir dir cmd [args...]   - run command in a given directory
  compare_files [--ignore-eol] file1 file2
                              - check if file1 is same as file2
  copy <file>... destination  - copy files to destination (either file or directory)
  copy_directory <dir>... destination   - copy content of <dir>... directories to 'destination' directory
  copy_if_different <file>... destination  - copy files if it has changed
  echo [<string>...]        - displays arguments as text
  echo_append [<string>...] - displays arguments as text but no new line
  env [--unset=NAME ...] [NAME=VALUE ...] [--] <command> [<arg>...]
                            - run command in a modified environment
  environment               - display the current environment
  make_directory <dir>...   - create parent and <dir> directories
  md5sum <file>...          - create MD5 checksum of files
  sha1sum <file>...         - create SHA1 checksum of files
  sha224sum <file>...       - create SHA224 checksum of files
  sha256sum <file>...       - create SHA256 checksum of files
  sha384sum <file>...       - create SHA384 checksum of files
  sha512sum <file>...       - create SHA512 checksum of files
  remove [-f] <file>...     - remove the file(s), use -f to force it (deprecated: use rm instead)
  remove_directory <dir>... - remove directories and their contents (deprecated: use rm instead)
  rename oldname newname    - rename a file or directory (on one volume)
  rm [-rRf] [--] <file/dir>... - remove files or directories, use -f to force it, r or R to remove directories and their contents recursively
  sleep <number>...         - sleep for given number of seconds
  tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]
                            - create or extract a tar or zip archive
  time command [args...]    - run command and display elapsed time
  touch <file>...           - touch a <file>.
  touch_nocreate <file>...  - touch a <file> but do not create it.
  create_symlink old new    - create a symbolic link new -> old
  create_hardlink old new   - create a hard link new -> old
  true                      - do nothing with an exit code of 0
  false                     - do nothing with an exit code of 1

Command PhaseScriptExecution failed with a nonzero exit code

However, FO still gets created correctly, but crashes on startup with this output to the console:

$ ./FreeOrion
dyld[16272]: Library not loaded: '@rpath/Ogg.framework/Versions/1.3.2/Ogg'
  Referenced from: '/Volumes/FreeOrion 1/FreeOrion.app/Contents/MacOS/FreeOrion'
  Reason: tried: '/Volumes/FreeOrion 1/FreeOrion.app/Contents/MacOS/../SharedSupport/Ogg.framework/Versions/1.3.2/Ogg' (no such file), '/Volumes/FreeOrion 1/FreeOrion.app/Contents/MacOS/../Frameworks/Ogg.framework/Versions/1.3.2/Ogg' (no such file), '/Volumes/FreeOrion 1/FreeOrion.app/Contents/MacOS/../SharedSupport/Ogg.framework/Versions/1.3.2/Ogg' (no such file), '/Volumes/FreeOrion 1/FreeOrion.app/Contents/MacOS/../Frameworks/Ogg.framework/Versions/1.3.2/Ogg' (no such file), '/Library/Frameworks/Ogg.framework/Versions/1.3.2/Ogg' (no such file), '/System/Library/Frameworks/Ogg.framework/Versions/1.3.2/Ogg' (no such file)
Abort trap: 6

I'm confused 😕

@o01eg
Copy link
Contributor Author

o01eg commented Dec 29, 2024

@Vezzra I forgot to add those libraries as components. Here is fixed commit o01eg/freeorion@7b46e7b

@o01eg o01eg dismissed Vezzra’s stale review December 29, 2024 18:08

To request again

@o01eg
Copy link
Contributor Author

o01eg commented Dec 30, 2024

It looks like fixed now on MacOS too https://github.com/o01eg/freeorion/actions/runs/12537393113

Copy link
Member

@Vezzra Vezzra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I just tried to build commit e9bbf6da9b8dbbb8a8c81c770328e6034700a049 ("Add requirements for Boost.Random and Boost.Graph libraries") of the master branch on your repo, and that worked. I can build and run it.

@Vezzra
Copy link
Member

Vezzra commented Dec 31, 2024

On a second thought, I don't think building that commit pulled the updated SDK. Looks like it used the normal V14 of the SDK, so I probably need to build the SDK manually and check if it works with that commit in your master branch.

@Vezzra
Copy link
Member

Vezzra commented Dec 31, 2024

Ok, sorry, obviously I got confused which commit to use to check/test which issue/PR. Looks like the commit I need to build to check this PR here is o01eg/freeorion@ddc5236 now, correct?

I'll try that now.

@o01eg
Copy link
Contributor Author

o01eg commented Jan 1, 2025

Oh, I often use master to run full tests, correct one is o01eg/freeorion@bf4dda0

@o01eg o01eg requested a review from Vezzra January 1, 2025 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants