Alexander Skwar | 7 Dec 12:31

apr files not picked up?

Hello again :)

I'm trying to get fsvs to compile on a Solaris 10 Sparc
system. To configure, I ran:

CC=/opt/csw/gcc4/bin/gcc CPP=/opt/csw/gcc4/bin/cpp \
 LDFLAGS="-L/opt/csw/lib -L/opt/csw/apache2/lib -L/opt/csw/lib/svn" \
 CPPFLAGS="-I/opt/csw/include -I/opt/csw/apache2/include -I/opt/csw/include/subversion-1" \
 PATH=/opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:$PATH \
 ./configure \
 --prefix=$HOME/.software --with-aprinc=/opt/csw/apache2/include \
 --with-aprlib=/opt/csw/apache2/lib --with-svnlib=/opt/csw/lib/svn \
 --with-svninc=/opt/csw/include/subversion-1

Now I'm trying to "make" it:

CC=/opt/csw/gcc4/bin/gcc CPP=/opt/csw/gcc4/bin/cpp \
 LDFLAGS="-L/opt/csw/lib -L/opt/csw/apache2/lib -L/opt/csw/lib/svn" \
 CPPFLAGS="-I/opt/csw/include -I/opt/csw/apache2/include -I/opt/csw/include/subversion-1" \
 PATH=/opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:$PATH \
 /opt/csw/bin/gmake

During compilation, I get a lot of these:

In file included from options.h:13,
                 from warnings.h:13,
                 from warnings.c:14:
global.h:19:21: error: apr_md5.h: No such file or directory
global.h:20:25: error: apr_file_io.h: No such file or directory
     deps for waa.c
(Continue reading)

Philipp Marek | 7 Dec 13:01

Re: apr files not picked up?

On Friday 07 December 2007 Alexander Skwar wrote:
> Hello again :)
>
> I'm trying to get fsvs to compile on a Solaris 10 Sparc
> system. To configure, I ran:
>
> CC=/opt/csw/gcc4/bin/gcc CPP=/opt/csw/gcc4/bin/cpp \
>  LDFLAGS="-L/opt/csw/lib -L/opt/csw/apache2/lib -L/opt/csw/lib/svn" \
>  CPPFLAGS="-I/opt/csw/include -I/opt/csw/apache2/include
> -I/opt/csw/include/subversion-1" \
> PATH=/opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:$PATH \
>  ./configure \
>  --prefix=$HOME/.software --with-aprinc=/opt/csw/apache2/include \
>  --with-aprlib=/opt/csw/apache2/lib --with-svnlib=/opt/csw/lib/svn \
>  --with-svninc=/opt/csw/include/subversion-1
>
> Now I'm trying to "make" it:
>
> CC=/opt/csw/gcc4/bin/gcc CPP=/opt/csw/gcc4/bin/cpp \
>  LDFLAGS="-L/opt/csw/lib -L/opt/csw/apache2/lib -L/opt/csw/lib/svn" \
>  CPPFLAGS="-I/opt/csw/include -I/opt/csw/apache2/include
> -I/opt/csw/include/subversion-1" \
> PATH=/opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:$PATH \
>  /opt/csw/bin/gmake
The Makefile overrides these; but they should have been picked up by the 
configure.

Could you send me the output of 
	diff -u src/Makefile.in src/Makefile

(Continue reading)

Alexander Skwar | 7 Dec 13:05

Re: apr files not picked up?

Philipp Marek schrieb:
> On Friday 07 December 2007 Alexander Skwar wrote:
>> Hello again :)
>>
>> I'm trying to get fsvs to compile on a Solaris 10 Sparc
>> system. To configure, I ran:
>>
>> CC=/opt/csw/gcc4/bin/gcc CPP=/opt/csw/gcc4/bin/cpp \
>>  LDFLAGS="-L/opt/csw/lib -L/opt/csw/apache2/lib -L/opt/csw/lib/svn" \
>>  CPPFLAGS="-I/opt/csw/include -I/opt/csw/apache2/include
>> -I/opt/csw/include/subversion-1" \
>> PATH=/opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:$PATH \
>>  ./configure \
>>  --prefix=$HOME/.software --with-aprinc=/opt/csw/apache2/include \
>>  --with-aprlib=/opt/csw/apache2/lib --with-svnlib=/opt/csw/lib/svn \
>>  --with-svninc=/opt/csw/include/subversion-1
>>
>> Now I'm trying to "make" it:
>>
>> CC=/opt/csw/gcc4/bin/gcc CPP=/opt/csw/gcc4/bin/cpp \
>>  LDFLAGS="-L/opt/csw/lib -L/opt/csw/apache2/lib -L/opt/csw/lib/svn" \
>>  CPPFLAGS="-I/opt/csw/include -I/opt/csw/apache2/include
>> -I/opt/csw/include/subversion-1" \
>> PATH=/opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:$PATH \
>>  /opt/csw/bin/gmake
> The Makefile overrides these; 

You mean, it's good enough when I use "--with-svninc", right?
Well, I tried both ways, just to make sure :)

(Continue reading)

Philipp Marek | 7 Dec 13:29

Re: apr files not picked up?

On Friday 07 December 2007 Alexander Skwar wrote:
...
> They have. Without LDFLAGS/CPPFLAGS and/or --with-..., configure
> "fails", as the header files cannot be found.
>
> > Could you send me the output of
> > 	diff -u src/Makefile.in src/Makefile
> >
> > please?
>
> Sure. It's attached.
You're using gcc, and it gets 
	CFLAGS:= ... -idirafter /opt/csw/apache2/include
Why doesn't it find the files?

What happens if you change all "-idirafter" to "-I"?

--

-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!
Alexander Skwar | 7 Dec 13:41

Re: apr files not picked up?

Philipp Marek schrieb:
> On Friday 07 December 2007 Alexander Skwar wrote:
> ...
>> They have. Without LDFLAGS/CPPFLAGS and/or --with-..., configure
>> "fails", as the header files cannot be found.
>>
>>> Could you send me the output of
>>> 	diff -u src/Makefile.in src/Makefile
>>>
>>> please?
>> Sure. It's attached.
> You're using gcc, and it gets 
> 	CFLAGS:= ... -idirafter /opt/csw/apache2/include
> Why doesn't it find the files?
> 
> What happens if you change all "-idirafter" to "-I"?

Same problem :(

--($:~/Source/fsvs)-- diff -u src/Makefile.in src/Makefile
--- src/Makefile.in     2007-11-08 10:13:25.000000000 +0100
+++ src/Makefile        2007-12-07 13:39:12.806144000 +0100
@@ -15,19 +15,19 @@
 HEADREV        := "$Revision: 1124 $"
 VERSION        = $(shell  perl -e '($$r) = (q( $(HEADREV) ) =~ m:(\d+):); $$t= q( $(HEADURL) ) =~ m:/tags/([^/]+): ?
$$1 : "trunk"; print "$$t:$$r\n";' )

-CFLAGS := @CFLAGS@
+CFLAGS := -g -O2 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I/usr/include
-I/openpkg/include -I/opt/csw/apache2/include -I/opt/csw/include/subversion-1 -I/opt/csw/include/subversion-1
(Continue reading)

Philipp Marek | 8 Dec 14:39

Re: apr files not picked up?

On Friday 07 December 2007 Alexander Skwar wrote:
> Philipp Marek schrieb:
> > You're using gcc, and it gets
> > 	CFLAGS:= ... -idirafter /opt/csw/apache2/include
> > Why doesn't it find the files?
> >
> > What happens if you change all "-idirafter" to "-I"?
>
> Same problem :(
Is there something like strace on that system? To see whether gcc actually 
looks?

Regards,

Phil

--

-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!
Alexander Skwar | 8 Dec 22:19

Re: apr files not picked up?

Hi again!

On Dec 8, 2007 2:39 PM, Philipp Marek <philipp <at> marek.priv.at> wrote:
> On Friday 07 December 2007 Alexander Skwar wrote:
> > Philipp Marek schrieb:
> > > You're using gcc, and it gets
> > >     CFLAGS:= ... -idirafter /opt/csw/apache2/include
> > > Why doesn't it find the files?
> > >
> > > What happens if you change all "-idirafter" to "-I"?
> >
> > Same problem :(
> Is there something like strace on that system?

Yes. There's "truss". You can find the man page at
<http://docs.sun.com/app/docs/doc/816-5165/truss-1>, or
at <http://www.freebsd.org/cgi/man.cgi?query=truss&apropos=0&sektion=0&manpath=SunOS+5.10&format=html>,
if the docs.sun.com is once again too slow...

> To see whether gcc actually
> looks?

I uploaded truss outputs. See:

- 582k <http://s3.amazonaws.com/public-files.askwar/fsvs/compile-fsvs-truss-with-forks.txt.bz2>
- 10MB <http://s3.amazonaws.com/public-files.askwar/fsvs/compile-fsvs-truss-with-forks.txt>
- 25k <http://s3.amazonaws.com/public-files.askwar/fsvs/compile-fsvs-truss.txt>

They are the results of running:

(Continue reading)

Philipp Marek | 9 Dec 10:01

Re: apr files not picked up?

On Saturday 08 December 2007 Alexander Skwar wrote:
...
> They are the results of running:
>
> CC=/opt/csw/gcc4/bin/gcc CPP=/opt/csw/gcc4/bin/cpp \
>  LDFLAGS="-L/opt/csw/lib -L/opt/csw/apache2/lib -L/opt/csw/lib/svn"  \
>  CPPFLAGS="-I/opt/csw/include -I/opt/csw/apache2/include
> -I/opt/csw/include/subversion-1" \
>  PATH=/opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:$PATH \
>  /usr/bin/truss -o ../compile-fsvs-truss.txt -ade \
>  /opt/csw/gnu/make
...
Could you try using "CFLAGS" instead of "CPPFLAGS"?

Regards,

Phil

--

-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!
Alexander Skwar | 10 Dec 08:14

Re: apr files not picked up?

Philipp Marek schrieb:
> On Saturday 08 December 2007 Alexander Skwar wrote:
> ...
>> They are the results of running:
>>
>> CC=/opt/csw/gcc4/bin/gcc CPP=/opt/csw/gcc4/bin/cpp \
>>  LDFLAGS="-L/opt/csw/lib -L/opt/csw/apache2/lib -L/opt/csw/lib/svn"  \
>>  CPPFLAGS="-I/opt/csw/include -I/opt/csw/apache2/include
>> -I/opt/csw/include/subversion-1" \
>>  PATH=/opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:$PATH \
>>  /usr/bin/truss -o ../compile-fsvs-truss.txt -ade \
>>  /opt/csw/gnu/make
> ...
> Could you try using "CFLAGS" instead of "CPPFLAGS"?

No difference :(

Alexander
Philipp Marek | 11 Dec 08:42

Re: apr files not picked up?

In the truss trace I see this:

	28535:	
0.3057	execve("/u04/opt/csw/gcc4/bin/../libexec/gcc/sparc-sun-solaris2.8/4.0.2/cc1",
0x00042370, 0x000454B8)  argc = 8
	28535:	 argv:
	28535:	  /u04/opt/csw/gcc4/bin/../libexec/gcc/sparc-sun-solaris2.8/4.0.2/cc1
	28535:	  -E -quiet -iprefix
	28535:	  /u04/opt/csw/gcc4/bin/../lib/gcc/sparc-sun-solaris2.8/4.0.2/
	28535:	  -MM warnings.c -mcpu=v7
	28535:	 envp: COLLECT_GCC_OPTIONS='-MM' '-mcpu=v7'
	28535:	  GCC_EXEC_PREFIX=/u04/opt/csw/gcc4/bin/../lib/gcc/
	28535:	  COLLECT_GCC=/opt/csw/gcc4/bin/gcc CC=/opt/csw/gcc4/bin/gcc
	28535:	  CPP=/opt/csw/gcc4/bin/cpp
	28535:	  CPPFLAGS=-I/opt/csw/include -I/opt/csw/apache2/include -I/opt/csw/include/subversion-1

So a C compiler is called, and it gets the -I options.
But later it tries to find apr_md5, and fails:

	28535:	
0.3685	open("/u04/opt/csw/gcc4/bin/../lib/gcc/sparc-sun-solaris2.8/4.0.2/include/apr_md5.h",
O_RDONLY|O_NOCTTY) Err#2 ENOENT
	28535:	 0.3686	open("/opt/csw/include/apr_md5.h", O_RDONLY|O_NOCTTY) Err#2 ENOENT
	28535:	 0.3687	open("/opt/csw/gcc4/include/apr_md5.h", O_RDONLY|O_NOCTTY) Err#2 ENOENT
	28535:	 0.3687	open("/usr/include/apr_md5.h", O_RDONLY|O_NOCTTY) Err#2 ENOENT

And this happens if you use CFLAGS, too.
The Makefile has

	%.o:  %.c
(Continue reading)

Philipp Marek | 29 Dec 09:17

Re: apr files not picked up?

Hello Alexander!

I'm sorry for the delay, but I'm out of ideas.

Could you please try to remove the '@' in front of the compile and link lines, 
like this:

	%.o:  %.c
	  @echo "     CC $<"
=>	  $(CC) $(CFLAGS) -c -o $@ $<

	# if the Makefile has changed, the output will (at least sometimes)
	# change, too.
	$(DEST): $(C_FILES:%.c=%.o)
	  @echo "     Link $@"
=>	  $(CC) $(FSVS_LDFLAGS) $(LDLIBS) -o $@ $^

and send me the output?

Thank you!

Regards,

Phil

--

-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

Gmane