Date: Fri, 22 Jan 1999 09:34:19 +0200 From: Jeremy Lea <reg@shale.csir.co.za> To: freebsd-mozilla@freebsd.org Subject: Re: Internal compiler error? Message-ID: <19990122093419.A40822@shale.csir.co.za> In-Reply-To: <19990121184935.A6020@netmonger.net>; from Christopher Masto on Thu, Jan 21, 1999 at 06:49:35PM -0500 References: <19990121184935.A6020@netmonger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Thu, Jan 21, 1999 at 06:49:35PM -0500, Christopher Masto wrote: > I've started to look at getting this lizard built on my FreeBSD-current > machine, and apart from having to futz with the shared library naming > change, the build seemed to chug along pretty nicely.. until: The following patches may help you. They fix the library stuff and enable the use of the LinuxThreads port (http://lt.tar.com/). If you're building without pthreads be sure to add a "--with-threads=none" to the configure args when building glib-1.1.13. libc_r support is not working yet, but I'm slowly getting there, and then I'll submit it. The script also shows the correct commands to use the egcs and gtk11-devel ports. You should have the following ports installed: gmake autoconf egcs png jpeg glib11-devel gtk11-devel I'm not getting that error yet, but my overnight build fell over in uconv somewhere, with undefined references to nsDebug from nsString. Building again now. ---- #!/bin/sh # export MOZILLA_CLIENT=1 export MOZ_MEDIUM=1 export NO_MDUPDATE=1 # export BUILD_OPT=1 export USE_PTHREADS=1 MYMOZDIR=/usr/home/mozilla/mozilla export MYMOZDIR cd $MYMOZDIR MYOBJDIR=obj-`./build/autoconf/config.guess` export MYOBJDIR cd $MYMOZDIR/nsprpub gmake DIST=$MYMOZDIR/$MYOBJDIR/dist clobber_all cd .. rm -r $MYOBJDIR rm configure cvs update client.mk cd .. gmake -f mozilla/client.mk checkout cd mozilla/nsprpub cvs update cd .. LD_LIBRARY_PATH=$MYMOZDIR/$MYOBJDIR/dist/bin export LD_LIBRARY_PATH autoconf -l build/autoconf mkdir -p $MYOBJDIR/dist cd $MYMOZDIR/nsprpub gmake DIST=$MYMOZDIR/$MYOBJDIR/dist cd .. unset MOZILLA_CLIENT unset MOZ_MEDIUM unset NO_MDUPDATE unset BUILD_OPT unset USE_PTHREADS cd $MYMOZDIR/$MYOBJDIR ac_cv_prog_CC="egcc" ac_cv_prog_CXX="eg++" \ CPPFLAGS="-O -pipe -mno-486 -I/usr/local/include" \ LIBS="-L/usr/local/lib" \ GTK_CONFIG="/usr/X11R6/bin/gtk11d-config" \ ../configure --enable-toolkit=gtk --enable-debug \ --with-nspr="$MYMOZDIR/$MYOBJDIR/dist" --enable-editor \ --with-jpeg=/usr/local --with-png=/usr/local --with-pthreads gmake ---- --- nsprpub/config/FreeBSD.mk.orig Tue Dec 22 22:54:19 1998 +++ nsprpub/config/FreeBSD.mk Mon Jan 11 18:04:38 1999 @@ -32,8 +32,8 @@ ifeq ($(USE_PTHREADS),1) IMPL_STRATEGY = _PTH -OS_LIBS = -lc_r -DEFINES += -D_THREAD_SAFE +OS_LIBS = -lpthread +DEFINES += -D_THREAD_SAFE -DLINUXTHREADS else IMPL_STRATEGY = _EMU OS_LIBS = -lc --- nsprpub/pr/src/pthreads/ptthread.c.orig Tue Dec 22 23:32:24 1998 +++ nsprpub/pr/src/pthreads/ptthread.c Mon Jan 11 18:04:38 1999 @@ -293,7 +293,7 @@ /* * Linux doesn't have pthread_attr_setstacksize. */ -#ifndef LINUX +#if !defined(LINUX) && !defined(LINUXTHREADS) rv = pthread_attr_setstacksize(&tattr, stackSize); PR_ASSERT(0 == rv); #endif --- nsprpub/pr/tests/dtoa.c.orig Sat May 9 01:07:26 1998 +++ nsprpub/pr/tests/dtoa.c Mon Jan 11 18:04:38 1999 @@ -33,6 +33,7 @@ #include <locale.h> #include "prprf.h" #include "prdtoa.h" +#include <floatingpoint.h> static int failed_already = 0; @@ -43,6 +44,7 @@ double zero = 0.0; char cnvt[50]; + fpsetmask(0); num = 1e24; num1 = PR_strtod("1e24",NULL); if(num1 != num){ --- nsprpub/pr/tests/foreign.c.orig Fri Jan 8 05:15:21 1999 +++ nsprpub/pr/tests/foreign.c Mon Jan 11 18:04:38 1999 @@ -138,7 +138,7 @@ rv = pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED); PR_ASSERT(0 == rv); -#if !defined(LINUX) +#if !defined(LINUX) && !defined(LINUXTHREADS) rv = pthread_attr_setstacksize(&tattr, 64 * 1024); PR_ASSERT(0 == rv); #endif --- nsprpub/pr/tests/provider.c.orig Mon Oct 5 20:58:24 1998 +++ nsprpub/pr/tests/provider.c Mon Jan 11 18:04:38 1999 @@ -728,7 +728,7 @@ rv = pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED); PR_ASSERT(0 == rv); -#if !defined(LINUX) +#if !defined(LINUX) && !defined(LINUXTHREADS) rv = pthread_attr_setstacksize(&tattr, 64 * 1024); PR_ASSERT(0 == rv); #endif --- config/rules.mk.orig Sat Dec 12 15:02:01 1998 +++ config/rules.mk Mon Dec 14 16:21:21 1998 @@ -112,9 +112,6 @@ ifeq ($(OS_ARCH),HP-UX) SHARED_LIBRARY := $(LIBRARY:.a=.sl) else -ifneq (,$(filter FreeBSD NetBSD OpenBSD,$(OS_ARCH))) -SHARED_LIBRARY := $(LIBRARY:.a=.so.1.0) -else ifeq ($(OS_ARCH)$(OS_RELEASE),SunOS4.1) SHARED_LIBRARY := $(LIBRARY:.a=.so.1.0) else @@ -122,7 +119,6 @@ SHARED_LIBRARY := $(LIBRARY:.a=)_shr.a else SHARED_LIBRARY := $(LIBRARY:.a=.$(DLL_SUFFIX)) -endif endif endif endif --- configure.in.orig Wed Jan 6 18:52:59 1999 +++ configure.in Sat Jan 9 12:39:30 1999 @@ -143,14 +143,15 @@ fi ;; *-freebsd*) - if test -z "$GNU_CC"; then - DSO_LDOPTS="-Bshareable $DSO_LDOPTS" - fi if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` = "elf"; then DLL_SUFFIX="so" else DLL_SUFFIX="so.1.0" - fi ;; + DSO_LDOPTS="-shared" + fi + if test -z "$GNU_CC"; then + DSO_LDOPTS="-Bshareable $DSO_LDOPTS" + fi ;; *-netbsd*) DLL_SUFFIX=".so.1.0" @@ -215,8 +216,7 @@ dnl Checks for libraries. dnl ======================================================== -AC_CHECK_LIB(c_r, gethostbyname_r,, - AC_CHECK_LIB(c, strcpy)) +AC_CHECK_LIB(c_r, gethostbyname_r) AC_CHECK_LIB(m, atan) AC_CHECK_LIB(dl, dlopen) if [ test -z "$GNU_CXX" ]; then @@ -867,6 +867,8 @@ CFLAGS="$CFLAGS -D_REENTRANT" ;; *-*-linux*) CFLAGS="$CFLAGS -D_REENTRANT" ;; + *-*-freebsd*) + CFLAGS="$CFLAGS -D_THREAD_SAFE -DLINUXTHREADS" ;; alpha*-*-osf*) if [ test "$GNU_CC" = 1 ]; then CFLAGS="$CFLAGS -D_REENTRANT" @@ -912,6 +914,9 @@ *-*-linux*) AC_CHECK_LIB(pthread, pthread_attr_init, NSPR_LIBS="-lpthread $NSPR_LIBS") ;; +*-*-freebsd*) + NSPR_LIBS="$NSPR_LIBS -kthread" + CFLAGS="-D_THREAD_SAFE -DLINUXTHREADS $CFLAGS" ;; esac AC_MSG_CHECKING("for PR_GetCurrentThread in -lnspr21 with thread lib") --- js/src/prmjtime.c.orig Mon Nov 23 12:57:15 1998 +++ js/src/prmjtime.c Mon Nov 23 14:28:25 1998 @@ -342,7 +342,7 @@ JSInt64 maxtimet; struct tm tm; PRMJTime prtm; -#if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI ) || defined ( NETBSD ) || defined ( OPENBSD ) || defined( RHAPSODY ) +#if defined( XP_PC ) || defined( __FreeBSD__ ) || defined ( HPUX9 ) || defined ( SNI ) || defined ( NETBSD ) || defined ( OPENBSD ) || defined( RHAPSODY ) struct tm *ptm; #endif @@ -361,7 +361,7 @@ } JSLL_L2UI(local,time); PRMJ_basetime(time,&prtm); -#if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI ) || defined ( NETBSD ) || defined ( OPENBSD ) || defined( RHAPSODY ) +#if defined( XP_PC ) || defined( __FreeBSD__ ) || defined ( HPUX9 ) || defined ( SNI ) || defined ( NETBSD ) || defined ( OPENBSD ) || defined( RHAPSODY ) ptm = localtime(&local); if(!ptm){ return JSLL_ZERO; -- | If I was not so weak, if I was not so cold, --+-- If I was not so scared of being broken, growing old, | I would be. I would be... frail. | - jars of clay / much afraid / frail To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mozilla" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990122093419.A40822>