I am working on getting a FreeBSD build set up, and everything works so far, apart from that clang emits a load of errors and refuses to build.
Here's a build log:
http://builds.cuberite.org/job/Cuberite%.../8/console
Does anybody have an idea of what I need to change to make the build work?
Which version of FreeBSD do you have?
I have FreeBSD 10.2 x86, x64 and clang 3.4.1. After I fixed a link error cuberite fully compiled.
Is it possible to share the build script? Then I could also test around.
I have FreeBSD 10.2 x64
Here's the build script:
Code:
#!/usr/bin/env bash
set -e
# Server
git submodule update --init
export CUBERITE_BUILD_SERIES_NAME="Jenkins clang x64 Release (master)"
export CUBERITE_BUILD_ID="$BUILD_DISPLAY_NAME"
export CUBERITE_BUILD_DATETIME="`date`"
CC=clang CXX=clang++ cmake . -DCROSSCOMPILE=1 -DCMAKE_BUILD_TYPE=RELEASE
make
echo "$JOB_NAME $BUILD_DISPLAY_NAME \n $BUILD_URL" > Server/buildinfo
mkdir Server/Licenses
cp Install/ThirdPartyLicenses/* Server/Licenses/
cp CONTRIBUTORS Server/
cp LICENSE Server/
tar -cvzf Cuberite.tar.gz Server/*
sha1sum Cuberite.tar.gz > Cuberite.tar.gz.sha1
# ProtoProxy
pushd Tools/ProtoProxy
cmake .
make
sha1sum ProtoProxy > ProtoProxy.sha1
popd
# API Docs
pushd Server
./Cuberite <<- EOS
load APIDump
api
stop
EOS
cd API
tar -cvzf ../LuaAPI.tar.gz *
sha1sum ../LuaAPI.tar.gz > ../LuaAPI.tar.gz.sha1
popd
Okay. Cuberite compiles fine on my side. Have no idea about this errors, sorry.
My build goes up to 52% and then this:
[ 52%] Building CXX object src/Bindings/CMakeFiles/Bindings.dir/ManualBindings.cpp.o
/home/freebsd/cuberite/src/Bindings/ManualBindings.cpp:2478:9: error: use of undeclared identifier 'BUILD_COMMIT_ID'
L.Push(BUILD_COMMIT_ID);
^
/home/freebsd/cuberite/src/Bindings/ManualBindings.cpp:2489:9: error: use of undeclared identifier 'BUILD_DATETIME'
L.Push(BUILD_DATETIME);
^
/home/freebsd/cuberite/src/Bindings/ManualBindings.cpp:2500:9: error: use of undeclared identifier 'BUILD_ID'
L.Push(BUILD_ID);
^
/home/freebsd/cuberite/src/Bindings/ManualBindings.cpp:2511:9: error: use of undeclared identifier 'BUILD_SERIES_NAME'
L.Push(BUILD_SERIES_NAME);
^
4 errors generated.
*** Error code 1
Stop.
make[2]: stopped in /usr/home/freebsd/cuberite
*** Error code 1
Stop.
make[1]: stopped in /usr/home/freebsd/cuberite
*** Error code 1
Stop.
make: stopped in /usr/home/freebsd/cuberite
(10-27-2015, 03:37 AM)bearbin Wrote: [ -> ]I am working on getting a FreeBSD build set up, and everything works so far, apart from that clang emits a load of errors and refuses to build.
Here's a build log: http://builds.cuberite.org/job/Cuberite%.../8/console
Does anybody have an idea of what I need to change to make the build work?
Code:
...
-- Check size of int - failed
-- Check size of long - failed
...
...seems to be the problem, and that's cascading down to libevent which uses this CMake system to define its integer types.
I've no idea what's wrong, but I can suggest:
- Updating Clang
- Updating CMake
- Updating FreeBSD
- (potentially reinstalling the above)
- Ensuring that there aren't any leftover files from compiles on other operating systems
(10-27-2015, 05:48 AM)SphinxC0re Wrote: [ -> ]My build goes up to 52% and then this:
[ 52%] Building CXX object src/Bindings/CMakeFiles/Bindings.dir/ManualBindings.cpp.o
/home/freebsd/cuberite/src/Bindings/ManualBindings.cpp:2478:9: error: use of undeclared identifier 'BUILD_COMMIT_ID'
L.Push(BUILD_COMMIT_ID);
^
/home/freebsd/cuberite/src/Bindings/ManualBindings.cpp:2489:9: error: use of undeclared identifier 'BUILD_DATETIME'
L.Push(BUILD_DATETIME);
^
/home/freebsd/cuberite/src/Bindings/ManualBindings.cpp:2500:9: error: use of undeclared identifier 'BUILD_ID'
L.Push(BUILD_ID);
^
/home/freebsd/cuberite/src/Bindings/ManualBindings.cpp:2511:9: error: use of undeclared identifier 'BUILD_SERIES_NAME'
L.Push(BUILD_SERIES_NAME);
^
4 errors generated.
*** Error code 1
Stop.
make[2]: stopped in /usr/home/freebsd/cuberite
*** Error code 1
Stop.
make[1]: stopped in /usr/home/freebsd/cuberite
*** Error code 1
Stop.
make: stopped in /usr/home/freebsd/cuberite
In theory, these macros should be generated by CMake. Could you check for the existence of a BuildInfo.h file in src/ ?
Does anybody else have any ideas?
One of these days I'll try to my FreeBSD 10.1 x64
I don't know what the problem could be. Seems like the build system is having trouble defining some variables. But if I'm using an active shell for compiling, it works perfectly. i just built the executable from scratch on the FreeBSD machine we are using.