Frode Haugsgjerd | 22 Jun 19:36 2011
Picon

Compile errors on OpenBSD 4.8

Hi, I'm trying to compile fsvs on OpenBSD 4.8, and I have some problems. http://fsvs.tigris.org claims
that this is reported to work, but all i can find is a thread from 2006 that don't answer my questions.

First some info about my setup.

OpenBSD 4.8
From obsd packages:
autoconf-2.60
GNU Make 3.81
pcre-8.02p1
apr-1.2.11p4
subversion-1.6.15p0
gdbm-1.8.3p0
rsync-3.0.7
gcc 4.2.1

To satisfy gcc i had to write #include <stdlib.h>
in /usr/include/alloca.h , as obsd dont have this header.

Then gcc complained about trampolines, and i added 
CFLAGS  += -ftrampolines
to src/Makefile.in

Now comilation fails on:
     CC est_ops.c
est_ops.c: In function 'ops__read_special_entry':
est_ops.c:1728: error: 'ENODATA' undeclared (first use in this function)
est_ops.c:1728: error: (Each undeclared identifier is reported only once
est_ops.c:1728: error: for each function it appears in.)
gmake[1]: *** [est_ops.o] Error 1
(Continue reading)

P.Marek | 22 Jun 21:27 2011
Picon

Re: Compile errors on OpenBSD 4.8

Hello Frode!

> Hi, I'm trying to compile fsvs on OpenBSD 4.8, and I have some problems.
> http://fsvs.tigris.org claims that this is reported to work, but all i can find is a
> thread from 2006 that don't answer my questions.
...
> Can anyone provide some pointers to what i should try next? I guess the error suggests
> that some dependency is not satisfied, but I am not fluent in C so I'm lost at this
> point.

Please try a svn checkout:

    http://fsvs.tigris.org/svn/fsvs/branches/fsvs-1.2.x/fsvs

because it has a few FreeBSD fixes that are not in a released tarball yet.

If we get OpenBSD 4.8 running, I'll cut a fresh release.

Regards,

Phil

--

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

------------------------------------------------------
http://fsvs.tigris.org/ds/viewMessage.do?dsForumId=3923&dsMessageId=2772342

To unsubscribe from this discussion, e-mail: [dev-unsubscribe <at> fsvs.tigris.org].
(Continue reading)

Frode Haugsgjerd | 22 Jun 21:58 2011
Picon

RE: Re: Compile errors on OpenBSD 4.8

Ok, forgot to mention that the version i compiled was trunk r. 2447

Tried the 1.2 branch, same result, but except the trampoline error was gone.

Attached ./configure --enable-dev-fake 2>&1 |tee configure.log

and make output

------------------------------------------------------
http://fsvs.tigris.org/ds/viewMessage.do?dsForumId=3923&dsMessageId=2772356

To unsubscribe from this discussion, e-mail: [dev-unsubscribe <at> fsvs.tigris.org].
Attachment (config.log): application/octet-stream, 95 KiB
Attachment (configure.log): application/octet-stream, 4782 bytes
Attachment (make.log): application/octet-stream, 4446 bytes
P.Marek | 23 Jun 09:49 2011
Picon

RE: Re: Compile errors on OpenBSD 4.8

Hello Frode!

First of all - how about subscribing, so that I don't have to moderate your emails?
If you like I can do that for you, too.

> Ok, forgot to mention that the version i compiled was trunk r. 2447
Uh, the trunk is defunct.

> Tried the 1.2 branch, same result, but except the trampoline error was gone.
I'm not sure what you mean - the trampoline error was gone on the 1.2 branch, or only
the trampoline error remained?

> Attached ./configure --enable-dev-fake 2>&1 |tee configure.log
> and make output
Are these when using the 1.2 branch?

What gcc version are you using? On the 48 page I see
   Gcc 2.95.3 (+ patches), 3.3.5 (+ patches) and 4.2.1 (+patches)

I cannot find anything about the "-ftrampoline" option ... Please add it in the
generated Makefile, and try compiling again.

Regards,

Phil

--

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

(Continue reading)

Frode Haugsgjerd | 24 Jun 02:24 2011
Picon

RE: Re: Compile errors on OpenBSD 4.8

Hi, so far I've posted via "Discussions" on the web page, I can't find a subscribe button there. After some
digging, I found that a email to dev-subscribe <at> fsvs.tigris.org does the trick. Sorry for my ignorance.
It's been a while since I used tools like mutt and mailman :)

I found the page http://fsvs.tigris.org/source/browse/fsvs/ and assumed that trunk was the latest and
greatest. But if you assume...

It seems like I distracted you with all my talk about trampolines. In svn trunk the -ftrampolines flag was
missing. When I tried the 1.2 branch, the trampoline error was fixed.

My GCC version is as reported by "gcc -v" 4.2.1
This is the version that comes bundled with the OS.
I found an error in my first post, the latest system I've tested this on is OpenBSD 4.9

My real problems are with ops__read_special_entry 
 in est_ops.c 

Btw, I use fsvs on debian and really would like to be able to use it on our OBSD firewalls. I tailored the
example scripts to my use, and exchanged the automatic nightly commit to a reminder email. 
Something like "fsvs diff /etc |mutt -s "Have you forgotten to commit your changes?" user <at> host" This
forces me to commit changes with a proper log entry, and really helps tracking changes.

-Frode

------------------------------------------------------
http://fsvs.tigris.org/ds/viewMessage.do?dsForumId=3923&dsMessageId=2773549

To unsubscribe from this discussion, e-mail: [dev-unsubscribe <at> fsvs.tigris.org].

(Continue reading)

P.Marek | 25 Jun 09:04 2011
Picon

Re: Compile errors on OpenBSD 4.8

Hello Frode!

On Friday 24 June 2011 Frode Haugsgjerd wrote:
> Hi, so far I've posted via "Discussions" on the web page, I can't find a
> subscribe button there. After some digging, I found that a email to
> dev-subscribe <at> fsvs.tigris.org does the trick. Sorry for my ignorance. It's
> been a while since I used tools like mutt and mailman :)
No problem, glad that this is solved.

> My real problems are with ops__read_special_entry
>  in est_ops.c
And what is the real problem?
	est_ops.c: In function 'ops__read_special_entry':
	est_ops.c:1728: error: 'ENODATA' undeclared (first use in this function)
This one should be fixed since r2406, Dez 2003 ... now we're at r2455, so I 
wouldn't understand how this could affect you.

There's no ENODATA anymore in the FSVS sources ... Please double-check whether 
the checkout is current!

 
> Btw, I use fsvs on debian and really would like to be able to use it on our
> OBSD firewalls. I tailored the example scripts to my use, and exchanged
> the automatic nightly commit to a reminder email. Something like "fsvs
> diff /etc |mutt -s "Have you forgotten to commit your changes?" user <at> host"
> This forces me to commit changes with a proper log entry, and really helps
> tracking changes.
Yes, that would be one of the use cases ...

Regards,
(Continue reading)

P.Marek | 25 Jun 11:13 2011
Picon

Re: Compile errors on OpenBSD 4.8

> 	est_ops.c: In function 'ops__read_special_entry':
> 	est_ops.c:1728: error: 'ENODATA' undeclared (first use in this function)
> This one should be fixed since r2406, Dez 2003 
Oh, sorry, that should be 2009, of course.

--

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

------------------------------------------------------
http://fsvs.tigris.org/ds/viewMessage.do?dsForumId=3923&dsMessageId=2775631

To unsubscribe from this discussion, e-mail: [dev-unsubscribe <at> fsvs.tigris.org].

P.Marek | 25 Jun 20:23 2011
Picon

Re: Compile errors on OpenBSD 4.8

Hello Frode!

> Now gmake fails much later:
...
> /home/froh/sw/src/fsvs-1.2/src/fsvs.c:476: undefined reference to `fmemopen'
Well, this should be seen during configure - HAVE_FMEMOPEN - and then just the
debug-buffer options should be disabled during compilation.

You could try --enable-release - this would remove all debug print calls (although the
function would have to be removed by the linker). But that shouldn't be necessary!

> /home/froh/sw/src/fsvs-1.2/src/helper.c:1436: undefined reference to
> `iconv_open'
...
> From a quick web search it seems fmemopen is a glibc only
>
> I did some testing of openbsd's iconv, as suggested in this thread:
> https://bitbucket.org/medoc/recoll/issue/61/configure-on-openbsd-fails-on-iconv
...
> $ gcc iconvtest.c
> iconvtest.c:8: error: conflicting types for 'libiconv_open'
> /usr/local/include/iconv.h:73: error: previous declaration of
> 'libiconv_open' was here
Well, this is a compile error; with FSVS it's a linker problem.

Perhaps this is an artifact of not running configure again after the update; please
re-run "make clean", "configure", and "make".

Regards,

(Continue reading)

Frode Haugsgjerd | 25 Jun 22:41 2011
Picon

Re: Compile errors on OpenBSD 4.8

Hi again Phil !

2011/6/25 Philipp Marek <philipp <at> marek.priv.at>
Hello Frode!


> Now gmake fails much later:
...
> /home/froh/sw/src/fsvs-1.2/src/fsvs.c:476: undefined reference to `fmemopen'
Well, this should be seen during configure - HAVE_FMEMOPEN - and then just the
debug-buffer options should be disabled during compilation.

You could try --enable-release - this would remove all debug print calls (although the
function would have to be removed by the linker). But that shouldn't be necessary!

 
That worked, and adding this to configure also worked:
if [ `uname -s` = "OpenBSD" ]
then
        # OSX 10.6 - thanks, Florian.
        EXTRALIBS="-liconv"
        have_fmemopen=no
fi


> /home/froh/sw/src/fsvs-1.2/src/helper.c:1436: undefined reference to
> `iconv_open'
...
> From a quick web search it seems fmemopen is a glibc only
>
> I did some testing of openbsd's iconv, as suggested in this thread:
> https://bitbucket.org/medoc/recoll/issue/61/configure-on-openbsd-fails-on-iconv
...
> $ gcc iconvtest.c
> iconvtest.c:8: error: conflicting types for 'libiconv_open'
> /usr/local/include/iconv.h:73: error: previous declaration of
> 'libiconv_open' was here
Well, this is a compile error; with FSVS it's a linker problem.

 
Perhaps this is an artifact of not running configure again after the update; please
re-run "make clean", "configure", and "make".

Thanks, but I always do this when  recompiling.

I talked to a Mr. "NicM" on #openbsd <at> freenode, who identified a use of iconv_open outside #ifdef HAVE_LOCALES in helper.c

Then i supected HAVE_LOCALES was not set, and commented out the ifdef around  #include <iconv.h>
Now fsvs compiles.

--
Frode Haugsgjerd
Norway
P.Marek | 26 Jun 09:06 2011
Picon

Re: Compile errors on OpenBSD 4.8

On Saturday 25 June 2011 Frode Haugsgjerd wrote:
> That worked, and adding this to configure also worked:
> if [ `uname -s` = "OpenBSD" ]
> then
>         # OSX 10.6 - thanks, Florian.
>         EXTRALIBS="-liconv"
>         have_fmemopen=no
> fi
Ok, I'll add that.

 
> I talked to a Mr. "NicM" on #openbsd <at> freenode, who identified a use of
> iconv_open outside #ifdef HAVE_LOCALES in helper.c
> 
> Then i supected HAVE_LOCALES was not set, and commented out the ifdef
> around  #include <iconv.h>
> Now fsvs compiles.
Hmmm, so the HAVE_LOCALES detection doesn't work - because of the compiler 
error.
I'll add another test for that.

Thank you for your time and effort!

When I've fixed all that - may I ask you to run a test-checkout & compile, to 
see whether it works?

Regards,

Phil

--

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

------------------------------------------------------
http://fsvs.tigris.org/ds/viewMessage.do?dsForumId=3923&dsMessageId=2777141

To unsubscribe from this discussion, e-mail: [dev-unsubscribe <at> fsvs.tigris.org].


Gmane