I was trying to set up midgard on my debian ( unstable ) system.
Ran into a wierd error on the way. I have succesfully compiled and
installed midgard-libraries and mod_midgard. When I am trying to
compile the midgard-php4 the following thing happens.
root@localhost:~/midgard# rm -rf midgard-php4-1.4.1-7
root@localhost:~/midgard# tar -xjf midgard-php4-1.4.1-7.tar.bz2
root@localhost:~/midgard# cd midgard-php4-1.4.1-7
root@localhost:~/midgard/midgard-php4-1.4.1-7# ls
ChangeLog config.m4.session member.c mgd_file.h
mgd_pageelement.h mgd_style.h person.c sitegroup.c
INSTALL element.c mgd_access.h mgd_group.h mgd_pagelink.h
mgd_topic.h php_midgard.h snippet.c
LICENSE event.c mgd_article.h mgd_host.h mgd_person.h
midgard.c preferences.c snippetdir.c
Makefile.in eventmember.c mgd_attachment.h mgd_image.h
mgd_preferences.h mkall preparser-parser.y style.c
README.session file.c mgd_calendar.h mgd_internal.h mgd_preparser.h
oop.c preparser-scanner.l topic.c
article.c group.c mgd_element.h mgd_mail.h mgd_session.h
page.c preparser.c
attachment.c host.c mgd_errno.pl mgd_member.h mgd_sitegroup.h
pageelement.c session.c
calendar.c image.c mgd_event.h mgd_oop.h mgd_snippet.h
pagelink.c session.modules.c
config.m4 mail.c mgd_eventmember.h mgd_page.h mgd_snippetdir.h
parameter.c session.sql
root@localhost:~/midgard/midgard-php4-1.4.1-7# ./mkall
aclocal: macro `AC_ADD_LIBPATH' defined in acinclude.m4 but never used
aclocal: macro `AC_ADD_LIBRARY_WITH_PATH' defined in acinclude.m4 but never used
aclocal: macro `AC_ADD_LIBRARY' defined in acinclude.m4 but never used
aclocal: macro `AC_ADD_INCLUDE' defined in acinclude.m4 but never used
You should update your `aclocal.m4' by running aclocal.
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php4 -I/usr/include/php4/main
-I/usr/include/php4/Zend -I/usr/include/php4/TSRM
checking for PHP extension directory... /usr/lib/php4/20001222
checking for bison... bison -y
checking how to run the C preprocessor... gcc -E
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for flex... (cached) flex
checking for midgard support... yes, shared
checking for apxs... /usr/bin/apxs
checking for glib-config... /usr/bin/glib-config
checking for midgard experimental functions support... no
checking for Cygwin environment... no
checking for mingw32 environment... no
checking host system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependant libraries... pass_all
checking for object suffix... o
checking for executable suffix... configure: error: installation or configuration
problem: compiler cannot create executables.
I have figured out that for some stupid reason it passes extra -l to gcc and fixed that
root@mitechka:~/midgard/midgard-php4-1.4.1-7# tail config.log
configure:2298: checking for /usr/bin/ld option to reload object files
configure:2310: checking for BSD-compatible nm
configure:2348: checking whether ln -s works
configure:2369: checking how to recognise dependant libraries
configure:2542: checking for object suffix
configure:2548: gcc -c -g -O2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
conftest.c 1>&5
configure:2568: checking for executable suffix
configure:2578: gcc -o conftest -g -O2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
conftest.c -l -L/usr/lib -lglib 1>&5
/usr/bin/ld: cannot find -l--library=glib
collect2: ld returned 1 exit status
Now what I get is this:
gcc -I. -I/root/midgard/midgard-php4-1.4.1-7/
-I/root/midgard/midgard-php4-1.4.1-7/main -I/root/midgard/midgard-php4-1.4.1-7
-I/usr/include/php4 -I/usr/include/php4/main -I/usr/include/php4/Zend
-I/usr/include/php4/TSRM -DHAVE_CONFIG_H -g -O2 -I/usr/include/glib-1.2
-I/usr/lib/glib/include -ggdb -Wall -I/usr/include/glib-1.2 -I/usr/lib/glib/include -c
article.c -fPIC -DPIC -o article.lo
In file included from php_midgard.h:40,
from mgd_internal.h:25,
from article.c:21:
/usr/local/include/midgard/apache.h:3: httpd.h: No
such file or directory
/usr/local/include/midgard/apache.h:4: http_log.h:
No such file or directory
make[1]: *** [article.slo] Error 1
make[1]: Leaving directory
`/root/midgard/midgard-php4-1.4.1-7'
make: *** [all-recursive] Error 1
I don't get why doesn't it find my apache headers properly since they are ( and always
been )
in /usr/include/apache-1.3/
I will probably fix this by changing the Makefile, but in my understanding both
Makefile and configure
are supposed to be autogenerated and therefore not supposed to be manually edited.
Regards
--
The good things in life cause cancer in laboratory mice and are taxed beyond reality.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]