Comments (11)
Yep, with latest fixes everything seems to be building fine, thanks!
from botcraft.
It seems to be very similar to #5 but with a link error from openSSL instead of protocolcraft.
From what I see, you don't seem to have openSSL on your system, so botcraft is using the included one, but can't link to it afterward. I'll try to see what I can do.
In the meantime, you can try either try to:
- install openssl directly on your system or
- manually add the magical line
set_property(TARGET ssl // crypto PROPERTY POSITION_INDEPENDENT_CODE ON)
after theadd_library
in both3rparty/openssl/ssl/CMakeLists.txt
and3rdparty/openssl/crypto/CMakeLists.txt
from botcraft.
I sawed OpenSSL has been installed in my system, and I reinstalled it, but it didn't work. So i used the second solution, it succeed, Cheers.
from botcraft.
Yes botcraft installs openSSL if it does not find it. But only locally, not on your system. And this local installation is apparently not working because of the PIC thing
Glad it solves the problem for you, will try to fix it.
from botcraft.
Same but with glad
, can not find a setting for one...
UPD: found one but setting seems to be turned on but still having error...
from botcraft.
@maxsupermanhd could you elaborate on your error? Is the glad library found on your system or is it the one included in this repo that is built?
If it's not on your system, you should have a message Can't find glad, building it from sources
the first time you call cmake.
from botcraft.
For some reason it decided to build it's own version even if I have one installed, here is full log:
make -j4
[ 33%] Built target protocolCraft
[ 35%] Linking CXX shared library ../../bin/libbotcraft.so
/usr/bin/ld: ../3rdparty/glad/install/lib/libglad.a(glad.c.o): relocation R_X86_64_PC32 against symbol `glad_glGetString' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [botcraft/CMakeFiles/botcraft.dir/build.make:526: ../bin/libbotcraft.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:244: botcraft/CMakeFiles/botcraft.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
I tried appending -DCMAKE_CXX_FLAGS=-fPIC
to cmake configuration but that does not worked...
from botcraft.
Ok thanks for the details. I'm currently working on a fix that should work for both openssl and glad.
Where did you add -DCMAKE_CXX_FLAGS=-fPIC
? Because dependencies are built in a separate cmake process (for example here for glad). If you added it in the botcraft cmake call, it would just tell cmake to add -fPIC to protocolCraft and botcraft, which already have it. And btw, I think that a more "cmakeish" way of doing it would be -DCMAKE_POSITION_INDEPENDENT_CODE=ON
.
from botcraft.
I've added the cmake line to make both openssl and glad compiled with -fPIC, so it should solve both issues.
I've also added it to zlib as I assume the problem would have been the same. Please let me know if this works for you in a fresh build!
from botcraft.
... Aaand I was wrong, ImGui has same problem... I guess we better just slap it everywhere
from botcraft.
Obviously I thought about zlib but not imgui 😑
Wait for it
from botcraft.
Related Issues (20)
- Compilation error with glfw HOT 3
- [Version request] HOT 4
- [Version request] HOT 2
- [Version request] HOT 3
- [Version request] HOT 2
- [Version request] HOT 2
- [Version request] HOT 8
- [Version request] HOT 3
- [Version request] HOT 2
- [Version request] HOT 2
- [Version request] HOT 7
- Build Failure On Multiple Builds HOT 3
- [Version request] HOT 3
- [Version request] HOT 3
- [Version request] HOT 2
- [Version request] HOT 8
- [Version request] - 1.20.5 HOT 6
- [Version request] HOT 2
- [Version request] HOT 2
- [Version request] HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botcraft.