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

Add option YAML_ENABLE_PIC #1271

Merged
merged 3 commits into from
Feb 22, 2024
Merged

Add option YAML_ENABLE_PIC #1271

merged 3 commits into from
Feb 22, 2024

Conversation

humbertodias
Copy link
Contributor

@humbertodias humbertodias commented Feb 21, 2024

Features

On PSP/PS3, it's necessary to disable the YAML_ENABLE_PIC option to compile on MIPS.
The default value for YAML_ENABLE_PIC is ON

Error

docker run --platform=linux/amd64 --rm -i pspdev/pspdev:latest sh -s <<EOF
apk add git
git clone https://github.com/jbeder/yaml-cpp
cd yaml-cpp
mkdir -p build 
cd build
cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=/usr/local/pspdev/psp/share/pspdev.cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/pspdev/psp -DBUILD_SHARED_LIBS=OFF ..
make 
make install
EOF
-- Build files have been written to: /yaml-cpp/build
[  2%] Building CXX object CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilder.cpp.obj
cc1plus: error: cannot generate position-independent code for ‘-mabi=eabi’
make[2]: *** [CMakeFiles/yaml-cpp.dir/build.make:76: CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilder.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:861: CMakeFiles/yaml-cpp.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
[  2%] Building CXX object CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilder.cpp.obj
cc1plus: error: cannot generate position-independent code for ‘-mabi=eabi’
make[2]: *** [CMakeFiles/yaml-cpp.dir/build.make:76: CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilder.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:861: CMakeFiles/yaml-cpp.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Fix

docker run --platform=linux/amd64 --rm -i pspdev/pspdev:latest sh -s <<EOF
apk add git
git clone https://github.com/humbertodias/yaml-cpp
cd yaml-cpp
mkdir -p build 
cd build
cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=/usr/local/pspdev/psp/share/pspdev.cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/pspdev/psp -DBUILD_SHARED_LIBS=OFF -DYAML_ENABLE_PIC=OFF ..
make 
make install
EOF
[ 97%] Building CXX object util/CMakeFiles/yaml-cpp-read.dir/read.cpp.obj
[100%] Linking CXX executable read
[100%] Built target yaml-cpp-read
[ 84%] Built target yaml-cpp
[ 89%] Built target yaml-cpp-sandbox
[ 94%] Built target yaml-cpp-parse
[100%] Built target yaml-cpp-read
Install the project...

@humbertodias humbertodias changed the title Build on PSP/PS3 Skipping PIC for PSP/PS3 Feb 21, 2024
@humbertodias humbertodias changed the title Skipping PIC for PSP/PS3 Add option YAML_ENABLE_PIC Feb 22, 2024
@jbeder jbeder merged commit 76dc671 into jbeder:master Feb 22, 2024
33 checks passed
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

Successfully merging this pull request may close these issues.

2 participants