Re: compiling 1.3.2 on FreeBSD 5.2.1
On Mon, 23 Aug 2004 16:26:24 +0200 Dimitri Aivaliotis [EMAIL PROTECTED] wrote: On Mon, 23 Aug 2004 15:47:57 +0200 Stipe Tolj [EMAIL PROTECTED] wrote: what is the libbse.a library for on FreeBSD? Is it required on the LIBS or does -lc_r work already? The libkse.a library is the pthreads library, as far as I can tell: in /usr/src/lib/libpthread/Makefile: LIB=kse I've found a link that explains the different threading libraries in FreeBSD: http://kerneltrap.org/node/view/624/banner/1 (towards the bottom of the page) - Dimitri -- Dimitri Aivaliotis EveryWare AG Birmensdorferstrasse 125 8003 Zurich tel: +41 (1) 466 60 00 fax: +41 (1) 466 60 10
Re: compiling 1.3.2 on FreeBSD 5.2.1
Hello, On Sat, 21 Aug 2004 03:03:15 +0200 Stipe Tolj [EMAIL PROTECTED] wrote: sorry, the patch has been stripped and there was something missing. Please use the attached one. Thank you for the patch. Unfortunately, I'm still getting: gcc -D_REENTRANT=1 -I. -Igw -pthread -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/include/openssl -I/usr/local/include/mysql -o utils/seewbmp.o -c utils/seewbmp.c gcc -D_REENTRANT=1 -I. -Igw -pthread -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/include/openssl -I/usr/local/include/mysql -o utils/mtbatch.o -c utils/mtbatch.c gcc -D_REENTRANT=1 -I. -Igw -pthread -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/include/openssl -I/usr/local/include/mysql -o utils/run_kannel_box.o -c utils/run_kannel_box.c gcc -D_REENTRANT=1 -I. -Igw -pthread -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/include/openssl -I/usr/local/include/mysql -o wmlscript/wmlsc wmlscript/wmlsc.o libgw.a libwmlscript.a libwap.a libgwlib.a -lssl -lm -pthread -lc_r -L/usr/local/lib -lxml2 -lz -L/usr/local/lib -liconv -lm -L/usr/lib -lcrypto -lssl -L/usr/local/lib/mysql -lmysqlclient_r -lc_r -lz -lcrypt -lm -lc_r libgwlib.a(counter.o): In function `counter_create': counter.o(.text+0x1f): undefined reference to `pthread_spin_init' libgwlib.a(counter.o): In function `counter_destroy': counter.o(.text+0x45): undefined reference to `pthread_spin_destroy' libgwlib.a(counter.o): In function `counter_increase': counter.o(.text+0x69): undefined reference to `pthread_spin_lock' counter.o(.text+0x86): undefined reference to `pthread_spin_unlock' libgwlib.a(counter.o): In function `counter_increase_with': counter.o(.text+0xa1): undefined reference to `pthread_spin_lock' counter.o(.text+0xc7): undefined reference to `pthread_spin_unlock' libgwlib.a(counter.o): In function `counter_value': counter.o(.text+0xe1): undefined reference to `pthread_spin_lock' counter.o(.text+0xf8): undefined reference to `pthread_spin_unlock' libgwlib.a(counter.o): In function `counter_decrease': counter.o(.text+0x111): undefined reference to `pthread_spin_lock' counter.o(.text+0x137): undefined reference to `pthread_spin_unlock' libgwlib.a(counter.o): In function `counter_set': counter.o(.text+0x151): undefined reference to `pthread_spin_lock' counter.o(.text+0x171): undefined reference to `pthread_spin_unlock' gmake: *** [wmlscript/wmlsc] Error 1 I noticed your comment in the patch: # Do not include libc_r directly, use -pthread flag. but it seems that -lc_r is still included in the gcc line. How can I get this removed. - Dimitri -- Dimitri Aivaliotis EveryWare AG Birmensdorferstrasse 125 8003 Zurich tel: +41 (1) 466 60 00 fax: +41 (1) 466 60 10
Re: compiling 1.3.2 on FreeBSD 5.2.1
Hello Stipe, If you replace the line +LIBS=$LIBS -pthread in your patch with +LIBS=$LIBS -lc_r -lkse then, it will compile. If you include only -lkse, you will get an error like the following in config.log: configure:1955: checking whether the C compiler works configure:1961: ./a.out Fatal error 'Spinlock called when not threaded.' at line 88 in file /usr/src/lib/ libpthread/thread/thr_spinlock.c (errno = 0) ./configure: line 1: 12840 Segmentation fault (core dumped) ./$ac_file configure:1964: $? = 139 configure:1973: error: cannot run C compiled programs. HTH - Dimitri -- Dimitri Aivaliotis EveryWare AG Birmensdorferstrasse 125 8003 Zurich tel: +41 (1) 466 60 00 fax: +41 (1) 466 60 10
Re: compiling 1.3.2 on FreeBSD 5.2.1
Dimitri Aivaliotis wrote: Hello Stipe, If you replace the line +LIBS=$LIBS -pthread in your patch with +LIBS=$LIBS -lc_r -lkse then, it will compile. If you include only -lkse, you will get an error like the following in config.log: configure:1955: checking whether the C compiler works configure:1961: ./a.out Fatal error 'Spinlock called when not threaded.' at line 88 in file /usr/src/lib/ libpthread/thread/thr_spinlock.c (errno = 0) ./configure: line 1: 12840 Segmentation fault (core dumped) ./$ac_file configure:1964: $? = 139 configure:1973: error: cannot run C compiled programs. ok, great. I'll patch it and commit to cvs. Thanks a lot. Stipe mailto:stolj_{at}_wapme.de --- Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:info_{at}_wapme-systems.de http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK-
Re: compiling 1.3.2 on FreeBSD 5.2.1
Dimitri Aivaliotis wrote: Hello Stipe, If you replace the line +LIBS=$LIBS -pthread in your patch with +LIBS=$LIBS -lc_r -lkse then, it will compile. If you include only -lkse, you will get an error like the following in config.log: configure:1955: checking whether the C compiler works configure:1961: ./a.out Fatal error 'Spinlock called when not threaded.' at line 88 in file /usr/src/lib/ libpthread/thread/thr_spinlock.c (errno = 0) ./configure: line 1: 12840 Segmentation fault (core dumped) ./$ac_file configure:1964: $? = 139 configure:1973: error: cannot run C compiled programs. HTH what is the libbse.a library for on FreeBSD? Is it required on the LIBS or does -lc_r work already? Stipe mailto:stolj_{at}_wapme.de --- Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:info_{at}_wapme-systems.de http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK-
Re: compiling 1.3.2 on FreeBSD 5.2.1
On Mon, 23 Aug 2004 15:47:57 +0200 Stipe Tolj [EMAIL PROTECTED] wrote: what is the libbse.a library for on FreeBSD? Is it required on the LIBS or does -lc_r work already? The libkse.a library is the pthreads library, as far as I can tell: in /usr/src/lib/libpthread/Makefile: LIB=kse I'm not a FreeBSD developer, so I don't really know how everything works together. I've tried with just -lc_r, and that doesn't work either. It appears that the magic LIBS line is -lc_r -lkse - Dimitri -- Dimitri Aivaliotis EveryWare AG Birmensdorferstrasse 125 8003 Zurich tel: +41 (1) 466 60 00 fax: +41 (1) 466 60 10
Re: compiling 1.3.2 on FreeBSD 5.2.1
Hi Dimitri, I have no access to that FreeBSD version, but please give it a try and try the attached patch, that fixes some CFLAGS and LIBS env var settings in configure. Simply apply the patch and re-create the configure script by using autoconf. BTW, since we are getting here to development relatend questions, I'm moving this to the devel@ list. Stipe mailto:stolj_{at}_wapme.de --- Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:info_{at}_wapme-systems.de http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK- RCS file: /home/cvs/gateway/configure.in,v retrieving revision 1.142 diff -u -r1.142 configure.in --- configure.in16 Jun 2004 09:47:45 - 1.142 +++ configure.in21 Aug 2004 00:53:19 - @@ -1,7 +1,64 @@ +dnl /* +dnl * The Kannel Software License, Version 1.0 +dnl * +dnl * Copyright (c) 2001-2004 Kannel Group +dnl * Copyright (c) 1998-2001 WapIT Ltd. +dnl * All rights reserved. +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * +dnl * 1. Redistributions of source code must retain the above copyright +dnl *notice, this list of conditions and the following disclaimer. +dnl * +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl *notice, this list of conditions and the following disclaimer in +dnl *the documentation and/or other materials provided with the +dnl *distribution. +dnl * +dnl * 3. The end-user documentation included with the redistribution, +dnl *if any, must include the following acknowledgment: +dnl * This product includes software developed by the +dnl *Kannel Group (http://www.kannel.org/). +dnl *Alternately, this acknowledgment may appear in the software itself, +dnl *if and wherever such third-party acknowledgments normally appear. +dnl * +dnl * 4. The names Kannel and Kannel Group must not be used to +dnl *endorse or promote products derived from this software without +dnl *prior written permission. For written permission, please +dnl *contact [EMAIL PROTECTED] +dnl * +dnl * 5. Products derived from this software may not be called Kannel, +dnl *nor may Kannel appear in their name, without prior written +dnl *permission of the Kannel Group. +dnl * +dnl * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +dnl * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +dnl * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl * DISCLAIMED. IN NO EVENT SHALL THE KANNEL GROUP OR ITS CONTRIBUTORS +dnl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +dnl * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +dnl * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +dnl * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +dnl * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +dnl * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +dnl * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl * +dnl * +dnl * This software consists of voluntary contributions made by many +dnl * individuals on behalf of the Kannel Group. For more information on +dnl * the Kannel Group, please see http://www.kannel.org/. +dnl * +dnl * Portions of this software are based upon software originally written at +dnl * WapIT Ltd., Helsinki, Finland for the Kannel project. +dnl */ + +dnl dnl configure.in -- main autoconf macro definition file dnl dnl Process this file with autoconf to produce a configure script. -dnl This file is part of the Kannel WAP and SMS gateway project. +dnl dnl initialization @@ -60,10 +117,15 @@ CFLAGS=$CFLAGS -DDARWIN=1 LIBTOOL=libtool -static -o ;; - *-linux-*) + *-linux-*) CFLAGS=$CFLAGS
Re: compiling 1.3.2 on FreeBSD 5.2.1
sorry, the patch has been stripped and there was something missing. Please use the attached one. Stipe mailto:stolj_{at}_wapme.de --- Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:info_{at}_wapme-systems.de http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK- Index: gateway/configure.in === RCS file: /home/cvs/gateway/configure.in,v retrieving revision 1.142 diff -u -r1.142 configure.in --- gateway/configure.in16 Jun 2004 09:47:45 - 1.142 +++ gateway/configure.in21 Aug 2004 01:01:22 - @@ -1,7 +1,64 @@ +dnl /* +dnl * The Kannel Software License, Version 1.0 +dnl * +dnl * Copyright (c) 2001-2004 Kannel Group +dnl * Copyright (c) 1998-2001 WapIT Ltd. +dnl * All rights reserved. +dnl * +dnl * Redistribution and use in source and binary forms, with or without +dnl * modification, are permitted provided that the following conditions +dnl * are met: +dnl * +dnl * 1. Redistributions of source code must retain the above copyright +dnl *notice, this list of conditions and the following disclaimer. +dnl * +dnl * 2. Redistributions in binary form must reproduce the above copyright +dnl *notice, this list of conditions and the following disclaimer in +dnl *the documentation and/or other materials provided with the +dnl *distribution. +dnl * +dnl * 3. The end-user documentation included with the redistribution, +dnl *if any, must include the following acknowledgment: +dnl * This product includes software developed by the +dnl *Kannel Group (http://www.kannel.org/). +dnl *Alternately, this acknowledgment may appear in the software itself, +dnl *if and wherever such third-party acknowledgments normally appear. +dnl * +dnl * 4. The names Kannel and Kannel Group must not be used to +dnl *endorse or promote products derived from this software without +dnl *prior written permission. For written permission, please +dnl *contact [EMAIL PROTECTED] +dnl * +dnl * 5. Products derived from this software may not be called Kannel, +dnl *nor may Kannel appear in their name, without prior written +dnl *permission of the Kannel Group. +dnl * +dnl * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +dnl * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +dnl * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl * DISCLAIMED. IN NO EVENT SHALL THE KANNEL GROUP OR ITS CONTRIBUTORS +dnl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +dnl * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +dnl * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +dnl * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +dnl * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +dnl * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +dnl * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl * +dnl * +dnl * This software consists of voluntary contributions made by many +dnl * individuals on behalf of the Kannel Group. For more information on +dnl * the Kannel Group, please see http://www.kannel.org/. +dnl * +dnl * Portions of this software are based upon software originally written at +dnl * WapIT Ltd., Helsinki, Finland for the Kannel project. +dnl */ + +dnl dnl configure.in -- main autoconf macro definition file dnl dnl Process this file with autoconf to produce a configure script. -dnl This file is part of the Kannel WAP and SMS gateway project. +dnl dnl initialization @@ -60,10 +117,15 @@ CFLAGS=$CFLAGS -DDARWIN=1 LIBTOOL=libtool -static -o ;; - *-linux-*) + *-linux-*) CFLAGS=$CFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE LDFLAGS=$LDFLAGS -rdynamic ;; + *-*-openbsd* | *-*-freebsd*) +# Do not include libc_r directly, use -pthread