My Page

[#1125] --disable-static breaks build

2009-09-29 14:56
Submitted by:
Stephan Kleine (bitshuffler)
Assigned to:
Nobody (None)
Operating System:
--disable-static breaks build

Detailed description
TBH I'm a bit confused how I am supposed to compile that thing since

it's some mix of autoconf & cmake.

The problem is that if I use "%configure" (which sets --prefix,

--exec-prefix, --mandir et al automatically) it fails with

http://pastebin.ca/1582809 . Also you can see that it uses e.g.

-DOPENVAS_STATE_DIR=\"/usr/var/lib/openvas\" and

-DOPENVAS_SYSCONFDIR=\"/usr/etc/openvas\" - as in it prepends the

prefix where it doesn't belong.

Contrary, if I just use "./configure" without any arguments it

compiles fine but all the stuff is bellow /usr/local which isn't right


So how am I supposed to set a proper prefix? In other words, you

should IMHO either use cmake or autoconf and not mix them but if you

insist on mixing them make it so "%configure" can be used since it

sets all the proper locations automatically.


Date: 2017-01-13 09:41
Sender: Michael Wiegand

Closing, openvas-libraries has been using CMake exclusively for quite some time
Date: 2010-02-04 23:00
Sender: Stephan Kleine

With the patches from http://wald.intevation.org/tracker/?func=detail&aid=1257&group_id=29&atid=220 it gets build with --disable-static but the flag doesn't work.

As in the .a stuff gets build anyways.

That's with -libraries 3.0.3
Date: 2009-11-12 00:57
Sender: Stephan Kleine

The problem is the "--disable-static" flag which normally shouldn't break the build but does it in that case.

Please adapt the bug subject - I lack the necessary privileges.
Date: 2009-11-11 18:23
Sender: Michael Meyer

Reproducible on OpenSUSE 11.1 and gentoo.

mime@kira:/tmp/openvas-libraries-3.0.0.beta6 % ./configure --disable-static


mime@kira:/tmp/openvas-libraries-3.0.0.beta6 % make

[ 33%] Building C object CMakeFiles/openvas-nasl.dir/strutils.c.o
/usr/bin/gcc -Wall -D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1 -g -Wall -I/tmp/openvas-libraries-3.0.0.beta6/nasl/../base -I/tmp/openvas-libraries-3.0.0.beta6/nasl/../hg -I/tmp/openvas-libraries-3.0.0.beta6/nasl/../misc -I/tmp/openvas-libraries-3.0.0.beta6/nasl/../include -DOPENVAS_STATE_DIR=\"/usr/local/var/lib/openvas\" -DVERSION=\"3.0.0.beta6\" -DOPENVAS_SYSCONFDIR=\"/usr/local/etc/openvas\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -o CMakeFiles/openvas-nasl.dir/strutils.c.o -c /tmp/openvas-libraries-3.0.0.beta6/nasl/strutils.c
make[3]: *** No rule to make target `../misc/.libs/libopenvas_misc.a', needed by `openvas-nasl'. Stop.
make[3]: Leaving directory `/tmp/openvas-libraries-3.0.0.beta6/nasl'
make[2]: *** [CMakeFiles/openvas-nasl.dir/all] Error 2
make[2]: Leaving directory `/tmp/openvas-libraries-3.0.0.beta6/nasl'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/openvas-libraries-3.0.0.beta6/nasl'
make: *** [all] Error 2

Date: 2009-10-06 15:12
Sender: Stephan Kleine

I tried r5405 and the unwanted prefix is gone now. However, the build still fails with " No rule to make target `../misc/.libs/libopenvas_misc.a', needed by `openvas-nasl'. Stop." like shown in the log.
Date: 2009-10-06 08:38
Sender: Michael Wiegand

I have just committed a patch which makes sure the localstatedir and sysconfdir set during configuration time are passed to CMake (see http://wald.intevation.org/plugins/scmsvn/viewcvs.php?rev=5388&root=openvas&view=rev).

Using "./configure --prefix=... --sysconfdir=... --localstatedir=..." should now yield the expected results again.
Date: 2009-10-01 15:10
Sender: Stephan Kleine

No. openvas-libraries/misc/.libs/ does exist and contains quite a bunch of files.

Also it would make no sense because, as said, without any "--prefix" the stuff compiles just fine but then ends up in /usr/local.
Date: 2009-10-01 07:20
Sender: Felix Wolfsteller

About the strageness of the mixed autotools/cmake approach:
This was done due to a lack of time and expertise. We would like to fully switch to cmake. -- I do not especially "like" this mixture :).

The second issue you mention is probably a libtool issue.
It seems that it happens when compiling the openvas-nasl standalone interpretor.

In openvas-libraries/nasl/CMakeLists.txt it is assumed that openvas-libraries/misc was compiled already and the results were (temporarily) placed in openvas-libraries/misc/.libs . Could you confirm that the folder does not exist or is empty in your setup?
Date: 2009-09-30 15:54
Sender: Stephan Kleine

Ok, that's what I guessed (somehow strange but if you like it ... ;D).

However, just to make that clear to prevent any misunderstanding: Compiling it with

./configure --prefix=/usr && make

does NOT work and leads to the problems shown in the above log:

1. *** No rule to make target `../misc/.libs/libopenvas_misc.a', needed by `openvas-nasl'. Stop.
2. -DOPENVAS_STATE_DIR=\"/usr/var/lib/openvas\"
3. -DOPENVAS_SYSCONFDIR=\"/usr/etc/openvas\"
Date: 2009-09-30 09:38
Sender: Felix Wolfsteller

Thanks for testing.

In a
./configure && make && make install
, cmake is called in the make step, thus for a user with the introduction of cmake nothing should have changed (yet).

Currently just the optional prefix is passed on to cmake, I guess the other flags should be passed as well.

Attached Files:


Field Old Value Date By
status_idOpen2017-01-13 09:41mwiegand
close_dateNone2017-01-13 09:41mwiegand
ResolutionNone2017-01-13 09:41mwiegand
summaryopenvas-libraries does not build properly2009-11-25 12:05felix

This site is hosted by Intevation GmbH