Skip to content

Unbreak build on FreeBSD#16701

Merged
AniLeo merged 10 commits intoRPCS3:masterfrom
jbeich:freebsd
Feb 13, 2025
Merged

Unbreak build on FreeBSD#16701
AniLeo merged 10 commits intoRPCS3:masterfrom
jbeich:freebsd

Conversation

@jbeich
Copy link
Copy Markdown
Contributor

@jbeich jbeich commented Feb 12, 2025

Fixes #16687

@Megamouse Megamouse added Build and CI Anything related to the build process and continuous integration OS: BSD labels Feb 12, 2025
rpcs3/util/cpu_stats.cpp:390:4: error: use of undeclared identifier 'getpid'
  390 |                         getpid(),
      |                         ^
FreeBSD doesn't support /latest and /quarterly package repos on EOL
versions. 13.3 reached EOL on 2024-12-31, so avoid CI breakage.

Failed to start an instance: INVALID_ARGUMENT: Not Found 404 Not Found
The resource 'projects/freebsd-org-cloud-dev/global/images/family/freebsd-13-3' was not found
CMake Error at modules/CMakeLists.txt:221 (file):
  file RELATIVE_PATH must be passed a full path to the directory:
  libcxx_prefix/lib
CMake Error at src/CMakeLists.txt:262 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_PROPERTY:libcxx-abi-shared,IMPORTED_LIBNAME>

  Target "libcxx-abi-shared" not found.

CMake Error at libcxx_build/include/cmake_install.cmake:4117 (file):
  file INSTALL cannot find "/tmp/cirrus-ci-build/libcxx_build/include/c++/v1/libcxx.imp": No
  such file or directory.
Linking different versions of libc++ can cause ABI issues but new C++
features are usually limited to headers.

ld: error: undefined symbol: operator new(unsigned long, std::align_val_t)
>>> referenced by string.cpp
>>>               string.cpp.o:(void* std::__1::__libcpp_operator_new[abi:ne190107]<unsigned long, std::align_val_t>(unsigned long, std::align_val_t)) in archive /tmp/cirrus-ci-build/libcxx_prefix/lib/libc++.a
>>> referenced by memory_string_searcher.cpp
>>>               memory_string_searcher.cpp.o:(memory_viewer_panel::OnSearch(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned int)) in archive rpcs3/rpcs3qt/librpcs3_ui.a
>>> referenced by game_list_frame.cpp
>>>               game_list_frame.cpp.o:(stx::auto_typemap<game_list_frame, 0u, 16u>::auto_typemap()) in archive rpcs3/rpcs3qt/librpcs3_ui.a
>>> referenced 23 more times
# libc++ isn't in llvm* packages, so download manually
fetch https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/llvm-project-19.1.7.src.tar.xz
tar xf llvm*.tar.xz
export CC=clang19 CXX=clang++19
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will it use clang without this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep. FreeBSD uses Clang/libc++ by default since 10.0, released on 2014-01-20.

13.4 ships Clang/libc++ 18 while upcoming FreeBSD 13.5 should have Clang/libc++ 19. Unless RPCS3 switches to C++23 before that it's unlikely to cause issues.

jbeich and others added 5 commits February 13, 2025 02:02
- RPCS3 still uses C++20 which no longer needs recent Clang/libc++
- FreeBSD releases more frequently, bringing newer Clang/libc++
- bundled libc++ wastes too much limited CI time
@AniLeo AniLeo merged commit 800c0f7 into RPCS3:master Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build and CI Anything related to the build process and continuous integration OS: BSD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: FreeBSD CI is currently broken

4 participants