Interesting...If I run ./configure with --disable-mt I get the error about
pthread stuff not being present. If I run it with --disable-cache I get an
error about the cache functions not being present (listed below). If I
enable both it compiles cleanly, but I'm left with a binary that depends
heavily on tesearch.

mipsel-linux-uclibc-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
-I/home/eric/ddwrt/toolchains/4.1.0-uclibc-0.9.28/include -o .libs/owhttpd
owhttpd.o owhttpd_handler.o owhttpd_present.o owhttpd_write.o owhttpd_read.o
owhttpd_dir.o owhttpd_favicon.o -Wl,--rpath -Wl,/opt/owfs/lib
-L/home/eric/ddwrt/owfs-2.6p4/module/owlib/src/c -pthread
-L/home/eric/ddwrt/toolchains/4.1.0-uclibc-0.9.28/lib /home/eric/ddwrt/owfs-
2.6p4/module/owlib/src/c/.libs/libow.so -lpthread -ldl -Wl,--rpath
-Wl,/opt/owfs/lib
/home/eric/ddwrt/owfs-2.6p4/module/owlib/src/c/.libs/libow.so: undefined
reference to `OWQ_Cache_Add'
/home/eric/ddwrt/owfs-2.6p4/module/owlib/src/c/.libs/libow.so: undefined
reference to `OWQ_Cache_Get'
/home/eric/ddwrt/owfs-2.6p4/module/owlib/src/c/.libs/libow.so: undefined
reference to `OWQ_Cache_Del'
collect2: ld returned 1 exit status
make[4]: *** [owhttpd] Error 1
make[4]: Leaving directory `/home/eric/ddwrt/owfs-2.6p4
/module/owhttpd/src/c'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/eric/ddwrt/owfs-2.6p4/module/owhttpd/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/eric/ddwrt/owfs-2.6p4/module/owhttpd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/eric/ddwrt/owfs-2.6p4/module'
make: *** [all-recursive] Error 1

On 5/17/07, Eric Allen <[EMAIL PROTECTED]> wrote:

I'm using uclibc 0.9.28 and either gcc 4.1 or 3.4.6 (same result). Might
it be worth a shot to drop the reinitialization?

On 5/17/07, Christian Magnusson <[EMAIL PROTECTED]: mail]> wrote:

>
>
> Using the function __pthread_initialize() and variable
> __pthread_initial_thread_bos were highly risky, but it was necessary to do
> it
>
> due to a bug in libpthread with uclibc. After the main-process forked a
> new process and died, I had to re-initialize libpthread from the child to
> make mutexes work…
>
>
>
> I'm not sure how to fix this without reordering lots of code in owlib
> (and use pthread-function first time after deamon is called). This should
> fix the problem, but I never tried to do those changes before. The quick fix
> was to re-initialize pthread and it worked for all platforms I used at that
> time.
>
>
>
>         /* Have to re-initialize pthread since the main-process is gone.
>
>          *
>
>          * This workaround will probably be fixed in uClibc-0.9.28
>
>          * Other uClibc developers have noticed similar problems which
> are
>
>          * trigged when pthread functions are used in shared libraries.
> */
>
>         __pthread_initial_thread_bos = NULL;
>
>         __pthread_initialize();
>
>
>
>
>
> It's strange that you don't have PTHREAD_MUTEX_ADAPTIVE_NP defined in
> pthread.h. It's defined in all uclibc versions I have seen.
>
>
>
> Which uclibc-version do you have?
>
>
>
> /Christian
>
>
>
>
>
>
>
> *From:* [EMAIL PROTECTED]: mail][image:
> mail] [mailto:[EMAIL PROTECTED]: mail][image:
> mail] ] *On Behalf Of *Eric Allen
> *Sent:* den 16 maj 2007 06:04
> *To:* [EMAIL PROTECTED]: mail][image: mail]
> *Subject:* Re: [Owfs-developers] OWFS on DD-WRT
>
>
>
> It looks like there are three files it's used in: ow_cache.c,
> ow_locks.c, and ow_tree.c. The first two can be disabled with config
> options.
>
> When I attempted to build with gcc-mipsel-linux-uclibc 4.1 I got the
> following error
> owlib.c: In function 'LibStart':
> owlib.c:215: error: '__pthread_initial_thread_bos' undeclared (first use
> in this function)
> owlib.c:215: error: (Each undeclared identifier is reported only once
> owlib.c:215: error: for each function it appears in.)
> owlib.c:216: warning: implicit declaration of function
> '__pthread_initialize'
> owlib.c:219: warning: implicit declaration of function
> 'pthread_mutexattr_init'
> owlib.c:219: error: 'mattr' undeclared (first use in this function)
> owlib.c:220: warning: implicit declaration of function
> 'pthread_mutexattr_settype'
> owlib.c:220: error: 'PTHREAD_MUTEX_ADAPTIVE_NP' undeclared (first use in
> this function)
> owlib.c:221: error: 'pmattr' undeclared (first use in this function)
> make[4]: *** [owlib.lo] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
>
> On 5/15/07, *Eric Allen* <[EMAIL PROTECTED]: mail][image: mail]> wrote:
>
> Ah. Okay. How tough is it to build owfs for dd-wrt? Is it simply a
> matter of taking the source distro and compiling with mipsel-uclibc?
>
>
>
> On 5/15/07, *Paul Alfille *<[EMAIL PROTECTED]: mail][image:
> mail] [image: mail] > wrote:
>
> tsearch is the binary tree search that is part of glibc and some
> implementations of uClibc.  It may not have been included in the dd-wrt
> version of uClibc. It could be an optional part of owlib, like some of the
> semaphore and other code.
>
> Does that give you a place to look?
>
> Paul Alfille
>
> On 5/15/07, *Eric Allen* < [EMAIL PROTECTED]: mail][image:
> mail] [image: mail] *Error! Filename not specified.*> wrote:
>
>  I've gotten as far as the previous poster with install OWFS on DD-
> WRT: when I try to start the daemon I get a "can't resolve symbol
> 'tsearch' "-error. I tried installing uclibc from http://
> downloads.openwrt.org/whiterussian/packages/ and reordering
> LD_LIBRARY_PATH to load that libc, but then I just got a segfault.
> Any ideas how to proceed?
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net [image: mail][image: mail] [image:
> mail]*Error! Filename not specified.*
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Owfs-developers mailing list
> [EMAIL PROTECTED]: mail][image: mail] [image:
> mail] *Error! Filename not specified.*
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Owfs-developers mailing list
> [EMAIL PROTECTED]: mail][image: mail]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to