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

clang missing the libc++ #3

Open
netcan opened this issue Jan 4, 2022 · 3 comments
Open

clang missing the libc++ #3

netcan opened this issue Jan 4, 2022 · 3 comments

Comments

@netcan
Copy link

netcan commented Jan 4, 2022

hello, I using clang to compile my code, compile with libc++:

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
endif()

it works in my localhost, but does not work in github action(it loses a lot of system headers, https://github.com/netcan/config-loader/runs/4703563002?check_suite_focus=true). When I remove the CMake code above, It works in github action but compiles failed in my localhost(I have checked it must compile with clang system headers, using libc++).

so how to keep the same CMake in localhost and github action?
https://github.com/netcan/config-loader/blob/c%2B%2B20/CMakeLists.txt#L12

@egor-tensin
Copy link
Owner

Could it be that libc++ is not installed on GitHub Actions runners? Can you try installing the libc++-dev package (sudo apt install -y libc++-dev) and see if the problem persists?

@netcan
Copy link
Author

netcan commented Jan 5, 2022

sudo apt install -y libc++-dev

I tried to install libc++-13-dev, libc++-dev is installed and I use clang13 version. but it installs failed.

sudo apt-get install -y libc++-13-dev
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc++-13-dev : Depends: libc++1-13 (= 1:13.0.1~++20211223012851+9468a0f95385-1~exp1~20211223012902.41) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

https://github.com/netcan/config-loader/runs/4714090393?check_suite_focus=true

@Klaim
Copy link

Klaim commented Feb 28, 2024

I'm hitting the same issue with Ubuntu images on github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants