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

Unable to install in CentOS 7 #48

Closed
eletious opened this issue May 18, 2018 · 9 comments
Closed

Unable to install in CentOS 7 #48

eletious opened this issue May 18, 2018 · 9 comments

Comments

@eletious
Copy link

Hello,

I am unable to build ulfius in CentOS 7 - using the makefile directions, I've installed Orcania, but yder fails to install with the following output:

cd ./src && make make[1]: Entering directory /REDACTED/ulfius/lib/yder/src'
gcc -shared -Wl,-soname,libyder.so -o libyder.so.1.2.1 yder.o -lc -lorcania
/usr/bin/ld: cannot find -lorcania
collect2: error: ld returned 1 exit status
make[1]: *** [libyder.so] Error 1
make[1]: Leaving directory /REDACTED/ulfius/lib/yder/src' make: *** [libyder.so] Error 2

I'm building as root on a CI server - does this require that you build as a nonroot user?

@babelouest
Copy link
Owner

Usually, the error cannot find -lorcania can be fixed with re-running the command sudo ldconfig. Ulfius doesn't have to be compiled as root (although it can be), only the make install command has to be executed as root.

Maybe a better way for your automatisation is to install ulfius with the cmake script though.

$ mkdir build
$ cd build
$ cmake .. 
$ make && sudo make install

@eletious
Copy link
Author

I attempted to use cmake initially, but centos7 uses the wrong version of cmake - >= 3.5 is required, but centos bundles 2.8.12.2

I also was unable to get it built after running ldconfig, though that should have made orcania available for use if I'm understanding this correctly.

@babelouest
Copy link
Owner

I assume you install it with the default params. i.e. in /usr/local/lib.

Do you have liborcania* files in this folder after installing Orcania? What are they?

@eletious
Copy link
Author

I have liborcania.so.1.2.1 in that directory

@babelouest
Copy link
Owner

After a quick test on a Docker image, I found the solution and was able to install ulfius.

You need to add /usr/local/lib at the end of the file /etc/ld.so.conf and run ldconfig -v as root as explained here: https://serverfault.com/a/372998

Then you should be able to build properly orcania, yider, ulfius, then your application

@babelouest
Copy link
Owner

The packages I had to install were:

gnutls-devel
systemd-devel
libmicrohttpd-devel
jansson-devel
libcurl-devel
make
gcc

I'll update the documentation for CentOS.

@eletious
Copy link
Author

The library exists now, and I was able to make install, however now the project I'm working on won't compile... undefined references to all of the functions I used from ulfius, which I now get in Ubuntu as well. Must be doing something wrong on my end...

@babelouest
Copy link
Owner

I could make the simple example working in my case.
Maybe you had a -lulfius or a ldconfig missing.

@babelouest
Copy link
Owner

@eletious , any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants