Cuberite Forum
Stuck with getting Cuberite to compile on FreeBSD - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Stuck with getting Cuberite to compile on FreeBSD (/thread-2182.html)

Pages: 1 2 3 4 5


Stuck with getting Cuberite to compile on FreeBSD - bearbin - 10-27-2015

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%20FreeBSD%20x64%20Master/8/console

Does anybody have an idea of what I need to change to make the build work?


RE: Stuck with getting Cuberite to compile on FreeBSD - Seadragon91 - 10-27-2015

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.


RE: Stuck with getting Cuberite to compile on FreeBSD - bearbin - 10-27-2015

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



RE: Stuck with getting Cuberite to compile on FreeBSD - Seadragon91 - 10-27-2015

Okay. Cuberite compiles fine on my side. Have no idea about this errors, sorry.


RE: Stuck with getting Cuberite to compile on FreeBSD - sphinxc0re - 10-27-2015

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


RE: Stuck with getting Cuberite to compile on FreeBSD - tigerw - 10-27-2015

(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%20FreeBSD%20x64%20Master/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:
  1. Updating Clang
  2. Updating CMake
  3. Updating FreeBSD
  4. (potentially reinstalling the above)
  5. 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/ ?


RE: Stuck with getting Cuberite to compile on FreeBSD - worktycho - 10-27-2015

Most likely something is going wrong with https://github.com/cuberite/cuberite/blob/master/CMakeLists.txt#L26 . If this fails the buildInfo generates improperly.


RE: Stuck with getting Cuberite to compile on FreeBSD - bearbin - 10-28-2015

Does anybody else have any ideas?


RE: Stuck with getting Cuberite to compile on FreeBSD - DrMasik - 10-28-2015

One of these days I'll try to my FreeBSD 10.1 x64


RE: Stuck with getting Cuberite to compile on FreeBSD - sphinxc0re - 11-04-2015

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.