Hi all,
I'm packaging openclonk in Buildroot [1] and I would like to give some feedback about some issues I had.
Buildroot is doing automated cross-compilation only and we don't rely on the packages installed on the build machine (host).
If a tool is required on the host, Buildroot build a host variant (host-openclonk) before building the target variant (openclonk).
Buildroot will create two build directories (one for the host and one for the target):
output/build/host-openclonk-7.0/
output/build/openclonk-7.0/
All binaries, headers and libraries for the host are installed in:
output/host/
All binaries, headers and libraries for the target are installed in:
output/staging/
(staging is used for cross-compiling, so no package build directory are used by other packages for their build)
All binaries and libraries for the target are installed in:
output/target
The first issue is building c4group tool for the host (using host-openclonk package) without requiring all other
dependencies (X11, GTK, SDL/SDL2, openGL etc). Currently there is no way to build only c4group.
On master there is a new HEADLESS_ONLY option that help but the openclonk-server is still build.
Also it's not clear to me what's the dependencies of c4group.
I backported some patches on stable-7 branch to add HEADLESS_ONLY option and I was able to build c4group.
The Cmake build system generate NativeToolsExport.cmake file that's expected to be used while cross-compiling
but it's not installed in output/host/...
Buildroot install c4group for the host in:
output/host/bin/c4group
Now openclonk for the target is build but the CMake build system expect a path to NativeToolsExport.cmake file.
It's unusual practice for cross-compiling to provide a path to a .cmake file, instead the we should simply
provide the path to output/host/bin/c4group.
Even if we know that NativeToolsExport.cmake is present in output/build/host-openclonk-7.0/, it's not a good
practice to set -DIMPORT_NATIVE_TOOLS="output/build/host-openclonk-7.0/NativeToolsExport.cmake".
For now, I don't have the choice and I cheated by doing so.
The build continue but stop due to link issue with libmisc and libc4script:
[...]/host/bin/x86_64-linux-g++ --sysroot=[...]sysroot
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
-std=gnu++14 -Wall -Wextra -Wredundant-decls -Wendif-labels
-Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self
-Wsign-promo -Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor
-Woverloaded-virtual -DNDEBUG
-rdynamic CMakeFiles/c4group.dir/src/c4group/C4GroupMain.cpp.o
-o c4group
-Wl,-rpath,/home/naourr/buildroot-test/test/openclonk/build/openclonk-7.0:
liblibmisc.so -lz -lpthread -lrt
liblibmisc.so : undefined reference to « C4LangStringTable::Translate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const »
liblibmisc.so : undefined reference to « C4LangStringTable::system_string_table »
That because these libraries must be build statically (STATIC key word must be used)
"add_library(libmisc STATIC ...)"
With that fixed, openclonk build fine but the build log is very noisy due to Wmisleading-indentation and Wimplicit-fallthrough introduced since gcc 6.
I pushed a branch with all my changes but it's still a WIP.
Otherwise I'm able to start openclonk on the target, see [3] :)
Thank for openclonk, I hope this feed back can help.
Best regards,
Romain
[1] https://buildroot.org/
[2] https://github.com/RomainNaour/openclonk/tree/stable-7-for-br
[3]
I'm packaging openclonk in Buildroot [1] and I would like to give some feedback about some issues I had.
Buildroot is doing automated cross-compilation only and we don't rely on the packages installed on the build machine (host).
If a tool is required on the host, Buildroot build a host variant (host-openclonk) before building the target variant (openclonk).
Buildroot will create two build directories (one for the host and one for the target):
output/build/host-openclonk-7.0/
output/build/openclonk-7.0/
All binaries, headers and libraries for the host are installed in:
output/host/
All binaries, headers and libraries for the target are installed in:
output/staging/
(staging is used for cross-compiling, so no package build directory are used by other packages for their build)
All binaries and libraries for the target are installed in:
output/target
The first issue is building c4group tool for the host (using host-openclonk package) without requiring all other
dependencies (X11, GTK, SDL/SDL2, openGL etc). Currently there is no way to build only c4group.
On master there is a new HEADLESS_ONLY option that help but the openclonk-server is still build.
Also it's not clear to me what's the dependencies of c4group.
I backported some patches on stable-7 branch to add HEADLESS_ONLY option and I was able to build c4group.
The Cmake build system generate NativeToolsExport.cmake file that's expected to be used while cross-compiling
but it's not installed in output/host/...
Buildroot install c4group for the host in:
output/host/bin/c4group
Now openclonk for the target is build but the CMake build system expect a path to NativeToolsExport.cmake file.
It's unusual practice for cross-compiling to provide a path to a .cmake file, instead the we should simply
provide the path to output/host/bin/c4group.
Even if we know that NativeToolsExport.cmake is present in output/build/host-openclonk-7.0/, it's not a good
practice to set -DIMPORT_NATIVE_TOOLS="output/build/host-openclonk-7.0/NativeToolsExport.cmake".
For now, I don't have the choice and I cheated by doing so.
The build continue but stop due to link issue with libmisc and libc4script:
[...]/host/bin/x86_64-linux-g++ --sysroot=[...]sysroot
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
-std=gnu++14 -Wall -Wextra -Wredundant-decls -Wendif-labels
-Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self
-Wsign-promo -Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor
-Woverloaded-virtual -DNDEBUG
-rdynamic CMakeFiles/c4group.dir/src/c4group/C4GroupMain.cpp.o
-o c4group
-Wl,-rpath,/home/naourr/buildroot-test/test/openclonk/build/openclonk-7.0:
liblibmisc.so -lz -lpthread -lrt
liblibmisc.so : undefined reference to « C4LangStringTable::Translate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const »
liblibmisc.so : undefined reference to « C4LangStringTable::system_string_table »
That because these libraries must be build statically (STATIC key word must be used)
"add_library(libmisc STATIC ...)"
With that fixed, openclonk build fine but the build log is very noisy due to Wmisleading-indentation and Wimplicit-fallthrough introduced since gcc 6.
I pushed a branch with all my changes but it's still a WIP.
Otherwise I'm able to start openclonk on the target, see [3] :)
Thank for openclonk, I hope this feed back can help.
Best regards,
Romain
[1] https://buildroot.org/
[2] https://github.com/RomainNaour/openclonk/tree/stable-7-for-br
[3]
Hm, I'm not really sure about the static libraries, but I think the changes are sane…
It looks like you're shooting fish on that picture, I like it.
It looks like you're shooting fish on that picture, I like it.
Hi Caesar,
Do you want me to create a pull request on github ?
For now I only tested over the stable-7 branch, I don't think these changes are ok for this version...
I should rebase this work on master.
Btw, do you plan to release OC 8 in near future ?
I'm shooting the red fish, I'm still angry against them (deep sea mining) :)
Romain
Do you want me to create a pull request on github ?
For now I only tested over the stable-7 branch, I don't think these changes are ok for this version...
I should rebase this work on master.
Btw, do you plan to release OC 8 in near future ?
I'm shooting the red fish, I'm still angry against them (deep sea mining) :)
Romain
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill