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

Compiling in Ubuntu 14.04 64 bits #565

Closed
acs opened this issue Oct 7, 2014 · 4 comments
Closed

Compiling in Ubuntu 14.04 64 bits #565

acs opened this issue Oct 7, 2014 · 4 comments

Comments

@acs
Copy link

acs commented Oct 7, 2014

When compiling in Ubuntu 14.04 64 bits there are several minor errors with:

/home/acs/devel/fiware/orion/fiware-orion/src/lib/orionTypes/TypeEntityVector.cpp:153:50: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t {aka long long unsigned int}’ [-Werror=format=]

Changing %lu to %llu fixes the problem. It seems that the correct fix is to use "PRIu64" but in "gcc version 4.8.2" it does not work directly.

Effort: 2 man day

@fgalan
Copy link
Member

fgalan commented Nov 5, 2014

The follwoing report from Alberto Martín could be also related with this issue:

While trying to install Orion Context Broker in Ubuntu 14.04, we got the following error:

make[3]: Entering directory `/root/fiware-orion/BUILD_RELEASE'
[ 0%] Building CXX object src/lib/logMsg/CMakeFiles/lm.dir/logMsg.cpp.o
/root/fiware-orion/src/lib/logMsg/logMsg.cpp:1015:7: error: size argument in 'strncat' call appears to be size of the source
[-Werror,-Wstrncat-size]
CHAR_ADD(format[fi], 1);
^~~~~~~~~~~~~~~~~~~~~~~
/root/fiware-orion/src/lib/logMsg/logMsg.cpp:174:22: note: expanded from macro 'CHAR_ADD'
strncat(line, xin, sizeof(xin) - 1); \
^~~~~~~~~~~~~~~
1 error generated.
make[3]: *** [src/lib/logMsg/CMakeFiles/lm.dir/logMsg.cpp.o] Error 1
make[3]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make[2]: *** [src/lib/logMsg/CMakeFiles/lm.dir/all] Error 2
make[2]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make: *** [release] Error 2

In order to fix it, we realised that the package g++ was needed. So:

apt-get install g++

And that throw us to the following one:

[ 99%] Building CXX object src/app/contextBroker/CMakeFiles/contextBroker.dir/contextBroker.cpp.o
Linking CXX executable contextBroker
/usr/bin/ld: cannot find -lboost_thread-mt
/usr/bin/ld: cannot find -lboost_filesystem-mt
/usr/bin/ld: cannot find -lboost_system-mt
collect2: error: ld returned 1 exit status
make[3]: *** [src/app/contextBroker/contextBroker] Error 1
make[3]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make[2]: *** [src/app/contextBroker/CMakeFiles/contextBroker.dir/all] Error 2
make[2]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/fiware-orion/BUILD_RELEASE'
make: *** [release] Error 2

We've found something related: http://stackoverflow.com/questions/20889614/missing-lboost-thread-mt-in-mongodb-cpp-driver-ubuntu-server-x64

Upgrading to the last Ubuntu 14.04:

apt-get update
apt-get upgrade
git clone https://github.com/staropram/cantcoap
cd cantcoap
git checkout 749e22376664dd3adae17492090e58882d3b28a7
sudo cp cantcoap.h /usr/local/include
sudo cp dbg.h /usr/local/include
sudo cp nethelper.h /usr/local/include
sudo cp libcantcoap.a /usr/local/lib

And

root@ubuntu:~/fiware-orion# make
root@ubuntu:~/fiware-orion# ./BUILD_RELEASE/src/app/contextBroker/contextBroker

We could finally install it successfully. Hope it helps.

@vijayn
Copy link

vijayn commented Aug 14, 2017

Can some one guide me in setting up Orion Context Broker on a Ubuntu System?

@fgalan
Copy link
Member

fgalan commented Aug 21, 2017

Maybe the information posted in this issue could help: #11

@fgalan
Copy link
Member

fgalan commented Mar 15, 2021

Can some one guide me in setting up Orion Context Broker on a Ubuntu System?

A procedure for Ubuntu 18.04 is described at https://fiware-orion.readthedocs.io/en/master/admin/build_source/index.html#ubuntu-1804-lts.

We understand this is enough by the time being so this old issue is closed.

@fgalan fgalan closed this as completed Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants