Hi. I am trying to install dacs on a ubuntu 10.4.
I have installed apache development files, apr and expat but compile shows this errors:
#./configure -prefix=/usr/local/dacs -disable-shared -enable-static -enable-passwd-auth -disable-bdb -with-apache=/etc/apache2 -with-expat=/usr -with-apxs=/usr/bin/apxs2 -with-apache-apr=/usr/include/apr-1.0
gcc -Wall -fno-strict-aliasing -Wno-unused -Wno-pointer-sign -fPIC -I. -I../include -I/usr/include -I/usr/include -I/usr/kerberos/include -I`/usr/bin/apxs2 -q INCLUDEDIR` -I/usr/bin/include/apr-1 \
-o version.o -c version.c
In file included from version.c:59:
/usr/include/apache2/ap_release.h:25:41: error: apr_general.h: No such file or directory
version.c: In function ‘dacs_component_versions’:
version.c:63: warning: implicit declaration of function ‘APR_STRINGIFY’
version.c:63: error: expected ‘)’ before string constant
make: *** Error 1
I have tried to solve this making a symbolic link like this:
#ln -s /usr/include/apr-1.0/ /usr/bin/include/apr-1/
and adding this variables:
but nothing works.
I think you must be very close…
It's not finding apr_general.h, which (based on your flags) I would expect to see in
/usr/bin/include/apr-1/apr_general.h or /usr/include/apr-1.0/apr_general.h
Is it in either of those places? If not, can you use 'find' or 'locate' to find out where
Also, which version of Apache are you using? (e.g., httpd -version)
Different Linux distributions sometimes install Apache differently, and this can make building DACS a little harder.
Having multiple versions of Apache installed on the same host can also cause problems.
I know it's something most people want to avoid if possible, but rebuilding and installing a separate, clean version
of Apache according to the DACS dacs.install(7) instructions should get you going faster… you can sort out the problem
building against the Ubuntu version later, if you want.
Hope this helps,
Thank you for your help Barry,
apr_general.h is located in /usr/include/apr-1.0/ and I am using Apache 2.2. Theoretically it should work but …. ;(
I would prefer to avoid installing a new version of apache. It' s harder to maintain and give a lot of headaches.
If I get dacs working on a ubuntu distribution I will post here a little guide to help people with the same problem.
OK, here is something to try.
Edit src/defs.mk and look around line 75 for something like:
apache_apr = -I/usr/bin/include/apr-1
Add another directory for gcc to include:
apache_apr = -I/usr/bin/include/apr-1 -I/usr/include/apr-1.0
(Also make the same change to src/defs.mk.in if you don't want to lose the change when you run configure.)
This should force gcc to also look in /usr/include/apr-1.0, which is where you say apr_general.h is.
I guess you should also double check the permissions on that directory and its files.
If this solves the problem, we will try to improve this build issue in the next release.
it works!. But now I have another problem when I execute "make":
gcc -Wall -fno-strict-aliasing -Wno-unused -Wno-pointer-sign -fPIC -I. -I../include -I/usr/include -I/usr/include -I/usr/kerberos/include -I`/usr/bin/apxs2 -q INCLUDEDIR` -I/usr/bin/include/apr-1 -I/usr/include/apr-1.0 \
-o version.o -c version.c
In file included from /usr/include/apr-1.0/apr_general.h:28,
/usr/include/apr-1.0/apr.h: In function ‘dacs_component_versions’:
/usr/include/apr-1.0/apr.h:289: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_off_t’
/usr/include/apr-1.0/apr.h:289: error: ‘apr_off_t’ undeclared (first use in this function)
/usr/include/apr-1.0/apr.h:289: error: (Each undeclared identifier is reported only once
/usr/include/apr-1.0/apr.h:289: error: for each function it appears in.)
make: *** Error 1
I have been looking for information about this issue and it seems that apr needs some flags to compile properly, but I am still studying the problem.
Thank you again
This is a bit hard to figure out without having access to your include files… what does line 289 of
/usr/include/apr-1.0/apr.h look like?
The versions of apr.h that I have have this definition near line 289:
typedef off_t apr_off_t;
So my best guess is that off_t is not being defined, though
I don't know why that should be.
The definition of both off_t and apr_off_t in version.c is unimportant, so if that is indeed
the problem you may be able to fix the error by defining off_t in version.c just before this line:
typedef long int off_t;
If that still doesn't work, perhaps you should contact me by email (send your apr.h) and we can
continue this offline.
Thank you again Barry,
You are invited to a beer the next time you come to Spain, ;).
Unfortunately, adding "typedef long int off_t;" to version.c didn't work. I think I must set compilation flags properly to solve the problem.
I found two promising links: one and two but I haven't yet solved the error.
You might be on the right track regarding the 32/64 bit file functions.
Also take a look at the man page for lseek64(3) and feature_test_macros(7).
It is also possible that there is something wrong with your current install of Apache…
I would still encourage you to try to work with a separate, clean install as described in
the DACS documentation - it might save you a lot of time.
I visited Barcelona many years ago and enjoyed it very much.
I will take a look to those man pages.
I don't like the idea of a fresh install because I prefer to use the Apache packages provides by the distribution. Now I am running a pair of ubuntu ad debian servers and I would like to get dacs working on them. If I can get that I will post int this forum a little "How to" to help ubuntu, debian and dacs users.
I added these lines at the start of version.c:
#define LINUX 2
These parameters are the output of :
$ apr-config -cppflags
After do that I could install and output only shows these errors:
Error reading ACL index
Could not get ACL list
file:///usr/local/dacs/acls: No such file or directory
I couldn't take a look on it but I think it's just a problem with the path of a file.
Thanks for figuring that out, Luis.
We will try to add that fix to the next release if there is time, or at least document it.
As for the installation error, I think you are right - there is a path problem.
/usr/local/dacs/acls should be a directory and should exist.
I suggest you look at dacs.quick(7), which is a tutorial designed to get you going
If you run into more problems, feel free to post here.
Thanks again for your solution!
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.