Mads Hjorth | 1 Mar 2010 22:45
Picon

Re: Problems building 2.7p29 on OpenBSD. Was 2.7p26

I am sorry. I was building an older version. I am just use to press the biggest and brightest button on the page :-)

2.7p29 is a different story. 

Besides two new dependencies to bash and sed (that I will try to fix), I see a problem in the owhttpd part. 

/bin/sh ../../../../libtool --tag=CC    --mode=link gcc -I../include  -I../../../owlib/src/include  -L../../../owlib/src/c  -fexceptions  -Wall  -W  -Wundef  -Wshadow  -Wpointer-arith  -Wcast-qual  -Wcast-align  -Wstrict-prototypes  -Wredundant-decls  -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L  -pthread  -I/usr/local/include -g -O2 -DNO_NESTED_FUNCTIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L    -o owhttpd owhttpd.o owhttpd_handler.o  owhttpd_present.o owhttpd_write.o  owhttpd_read.o owhttpd_dir.o  owhttpd_favicon.o -low -L/usr/local/lib -Wl,-R/usr/local/lib -lusb  -Wl,--rpath -Wl,/opt/owfs/lib  -lm
libtool: link: gcc -I../include -I../../../owlib/src/include -fexceptions -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wredundant-decls -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -pthread -I/usr/local/include -g -O2 -DNO_NESTED_FUNCTIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -o .libs/owhttpd owhttpd.o owhttpd_handler.o owhttpd_present.o owhttpd_write.o owhttpd_read.o owhttpd_dir.o owhttpd_favicon.o -Wl,-R/usr/local/lib -Wl,--rpath -Wl,/opt/owfs/lib  -L/home/download/owfs-2.7p29/module/owlib/src/c /home/download/owfs-2.7p29/module/owlib/src/c/.libs/libow.so -L/usr/local/lib /usr/local/lib/libusb.so.9.0 -lm -pthread -Wl,-rpath -Wl,/opt/owfs/lib
/home/download/owfs-2.7p29/module/owlib/src/c/.libs/libow.so: warning: strcpy() is almost always misused, please use strlcpy()
/home/download/owfs-2.7p29/module/owlib/src/c/.libs/libow.so: warning: strcat() is almost always misused, please use strlcat()
/home/download/owfs-2.7p29/module/owlib/src/c/.libs/libow.so: warning: sprintf() is often misused, please use snprintf()
owhttpd_handler.o(.text+0x63f): In function `handle_POST':
/home/download/owfs-2.7p29/module/owhttpd/src/c/owhttpd_handler.c:193: undefined reference to `getline'
owhttpd_handler.o(.text+0xbb1): In function `ReadToCRLF':
/home/download/owfs-2.7p29/module/owhttpd/src/c/owhttpd_handler.c:335: undefined reference to `getline'
owhttpd_handler.o(.text+0xcad): In function `GetPostPath':
/home/download/owfs-2.7p29/module/owhttpd/src/c/owhttpd_handler.c:372: undefined reference to `getline'
owhttpd_handler.o(.text+0xdce): In function `GetPostData':
/home/download/owfs-2.7p29/module/owhttpd/src/c/owhttpd_handler.c:411: undefined reference to `getline'
collect2: ld returned 1 exit status
*** Error code 1

Stop in /home/download/owfs-2.7p29/module/owhttpd/src/c (line 438 of Makefile).
*** Error code 1

Stop in /home/download/owfs-2.7p29/module/owhttpd/src (line 415 of Makefile).
*** Error code 1

Stop in /home/download/owfs-2.7p29/module/owhttpd (line 415 of Makefile).
*** Error code 1

Stop in /home/download/owfs-2.7p29/module (line 429 of Makefile).
*** Error code 1

Stop in /home/download/owfs-2.7p29 (line 470 of Makefile).



On Mar 1, 2010, at 05:15 , Paul Alfille wrote:

Actually the latest and greatest is 2.7p29

Can you try that?

Paul Alfille

On Sun, Feb 28, 2010 at 4:40 AM, Mads Hjorth <madsh <at> mac.com> wrote:
Hi Paul, 

I get:

# grep -r -n -I HAVE_GETADDRINFO * | grep define
config.log:3003:| #define HAVE_GETADDRINFO 1
config.log:3117:| #define HAVE_GETADDRINFO 1
config.log:3231:| #define HAVE_GETADDRINFO 1
config.log:3427:| #define HAVE_GETADDRINFO 1
config.log:3585:| #define HAVE_GETADDRINFO 1
config.log:4349:#define HAVE_GETADDRINFO 1
config.status:1216:s,^\([        #]*\)[^         ]*\([   ]*HAVE_GETADDRINFO\)[  
 (].*,\1define\2 1 ,
src/include/config.h:53:#define HAVE_GETADDRINFO 1


Looks to me that getaddrinfo is detected correctly. 

I was concerned about the date of the module/owshell/src/c/getaddrinfo.c 

It looks to me like the fix from october was not included in current branch...maybe...

Mads



On Feb 28, 2010, at 01:27 , Paul Alfille wrote:

That matches what I get in linux.

Can you try, in the owfs directory:

grep -r -n -I HAVE_GETADDRINFO * | grep define

I get:

paul <at> amd64ubuntu:~/owfs$ grep -r -n -I HAVE_GETADDRINFO * | grep define
config.log:2841:| #define HAVE_GETADDRINFO 1
config.log:2971:| #define HAVE_GETADDRINFO 1
config.log:3647:#define HAVE_GETADDRINFO 1
src/include/config.h:53:#define HAVE_GETADDRINFO 1

I'm trying to figure out if the configuration script is missing the presence of getaddrinfo, or if the compilation is not properly stopped.

Paul Alfille

On Sat, Feb 27, 2010 at 7:09 PM, Mads Hjorth <madsh <at> mac.com> wrote:
I get

/usr/share/man/cat3/getaddrinfo.0

NAME
     getaddrinfo, freeaddrinfo - host and service name to socket address
     structure

SYNOPSIS
     #include <sys/types.h>
     #include <sys/socket.h>
     #include <netdb.h>




On Feb 28, 2010, at 00:58 , Paul Alfille wrote:

I'm surprised getaddrinfo isn't present in OpenBSD. Can you try 'man getaddrinfo' and report which #includes are specified?

Paul Alfille

On Sat, Feb 27, 2010 at 6:29 PM, Mads Hjorth <madsh <at> mac.com> wrote:

Seems like getaddrinfo.c is still acting up. Anyone?


Mads



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 2 Mar 2010 02:34
Picon

Re: Problems building 2.7p29 on OpenBSD. Was 2.7p26



On Mon, Mar 1, 2010 at 4:45 PM, Mads Hjorth <madsh <at> mac.com> wrote:
I am sorry. I was building an older version. I am just use to press the biggest and brightest button on the page :-)


I can't quite figure out how Sourceforge chooses the "latest" verion. They keep "improving" their file upload process, but they seem to have lost the concept of a release.
 
2.7p29 is a different story. 

Besides two new dependencies to bash and sed (that I will try to fix), I see a problem in the owhttpd part. 

...
 
/home/download/owfs-2.7p29/module/owlib/src/c/.libs/libow.so: warning: strcpy() is almost always misused, please use strlcpy()
/home/download/owfs-2.7p29/module/owlib/src/c/.libs/libow.so: warning: strcat() is almost always misused, please use strlcat()
/home/download/owfs-2.7p29/module/owlib/src/c/.libs/libow.so: warning: sprintf() is often misused, please use snprintf()

This is a BSD vs Gnu difference. I like the BSD versions of the string functions, but they aren't consistently available in Linux. In any case, the functions are NOT misused in this case. And I do test.
 
owhttpd_handler.o(.text+0x63f): In function `handle_POST':
/home/download/owfs-2.7p29/module/owhttpd/src/c/owhttpd_handler.c:193: undefined reference to `getline'
owhttpd_handler.o(.text+0xbb1): In function `ReadToCRLF':
/home/download/owfs-2.7p29/module/owhttpd/src/c/owhttpd_handler.c:335: undefined reference to `getline'
owhttpd_handler.o(.text+0xcad): In function `GetPostPath':
/home/download/owfs-2.7p29/module/owhttpd/src/c/owhttpd_handler.c:372: undefined reference to `getline'
owhttpd_handler.o(.text+0xdce): In function `GetPostData':
/home/download/owfs-2.7p29/module/owhttpd/src/c/owhttpd_handler.c:411: undefined reference to `getline'


Another BSD vs Gnu fight. The gnu getline is far better than using fgets. Perhaps there is a compatible replacement function to use if getline isn't available.

Paul Alfille
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 2 Mar 2010 02:48
Picon

Re: Problems building 2.7p29 on OpenBSD. Was 2.7p26

Ok, found an implementation of getline at http://www.koders.com/c/fid7449041983F5893CBF13458C88271146BA685037.aspx?s=printf tht seems to do the trick.

I'll put it in.

Paul

On Mon, Mar 1, 2010 at 8:34 PM, Paul Alfille <paul.alfille <at> gmail.com> wrote:

Another BSD vs Gnu fight. The gnu getline is far better than using fgets. Perhaps there is a compatible replacement function to use if getline isn't available.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Christian Magnusson | 2 Mar 2010 09:13

Re: Problems building 2.7p29 on OpenBSD. Was 2.7p26

 

If getline is not available, you should check the presence with

 

#ifndef HAVE_GETLINE

/* getline compat function */

#endif

 

 

Since in src/include/config.h will look something like this…

/* #undef HAVE_GETLINE */

 

 

“#if ! HAVE_GETLINE” might fail on some systems since the variable isn’t defined.

 

/Christian

 

 

From: Paul Alfille [mailto:paul.alfille <at> gmail.com]
Sent: den 2 mars 2010 02:48
To: OWFS (One-wire file system) discussion and help
Subject: Re: [Owfs-developers] Problems building 2.7p29 on OpenBSD. Was 2.7p26

 

Ok, found an implementation of getline at http://www.koders.com/c/fid7449041983F5893CBF13458C88271146BA685037.aspx?s=printf tht seems to do the trick.

I'll put it in.

Paul

On Mon, Mar 1, 2010 at 8:34 PM, Paul Alfille <paul.alfille <at> gmail.com> wrote:


Another BSD vs Gnu fight. The gnu getline is far better than using fgets. Perhaps there is a compatible replacement function to use if getline isn't available.

 

 

__________ Information från ESET NOD32 Antivirus, version av virussignaturdatabas 4907 (20100302) __________

 

Meddelandet har kontrollerats av ESET NOD32 Antivirus.

 

http://www.esetscandinavia.com



__________ Information från ESET NOD32 Antivirus, version av virussignaturdatabas 4907 (20100302) __________

Meddelandet har kontrollerats av ESET NOD32 Antivirus.

http://www.esetscandinavia.com
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Gmane