Click to See Complete Forum and Search --> : Trouble compiling chromium on slack 9.1
psi42
10-15-2003, 01:19 AM
Well, I've got my slack 9.1 system up and running, but I can't get chromium to compile.
When I try "make," I get:
make[1]: Entering directory `/home/maedhros/sw/Chromium-0.9/support/openal'
mkdir -p ./lib
cd linux; sh autogen.sh; ./configure --enable-sdl; make
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.
WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':
WARNING: AC_DEFINE([NEED_MAIN], 1,
WARNING: [Define if a function `main' is needed.])
WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking whether byte ordering is bigendian... no
checking for sin in -lm... yes
checking for dlopen in -ldl... yes
./configure: line 3570: syntax error near unexpected token `newline'
./configure: line 3570: ` yes:no'
make[2]: Entering directory `/home/maedhros/sw/Chromium-0.9/support/openal/linux'
make[2]: *** No targets specified and no makefile found. Stop.
make[2]: Leaving directory `/home/maedhros/sw/Chromium-0.9/support/openal/linux'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/home/maedhros/sw/Chromium-0.9/support/openal'
make: *** [support/openal/] Error 2
Obviously it's not supposed to do that. :(
Any ideas? Or where I can find a slack 9.1 package?
Thanks in advance :),
~psi42
bwkaz
10-15-2003, 06:48 PM
If you downgrade your autoconf package, that might help. Dunno for sure, though...
JohnT
10-15-2003, 07:01 PM
Any ideas? Or where I can find a slack 9.1 package?
Your going to want a package more optimized than the one you have....Slack is on the edge with 9.1, so a lot of the older stuff won't compile out of the box.
psi42
10-16-2003, 11:19 PM
okay I decided to give other distros' binaries a try, and this mandrake 9.1 rpm (http://rpm.pbone.net/index.php3?idpl=393476&stat=4&search=chromium&com=chromium-0.9.12-18mdk.i586.rpm.html) works right away.
That's good luck. :D
I'd still like to know if anyone gets it to compile. :)
~psi42
bwkaz
10-17-2003, 07:56 PM
OK, *whew*. The version of OpenAL distributed with Chromium was one fscked up package. ;)
The fix was to edit support/openal/linux/configure.in before you run make. You have to search through it for "dmalloc", and in the dmalloc section, change this:
if test x$enable_dmalloc = xyes; then
AC_CHECK_HEADER(dmalloc.h,
dnl header found
AC_DEFINE(DMALLOC)
AC_DEFINE(DMALLOC_FUNC_CHECK)
INCLUDES="$INCLUDES -include \"/usr/include/dmalloc.h\""
LIBS="$LIBS -ldmallocth"
SHOULD_USE_WERROR=no
REDUNDANT_DECLS_WARN=no,
dnl header not found, check local/include
dnl invalid cache
AC_CHECK_HEADER(/usr/local/include/dmalloc.h,
dnl header found in local/include
AC_DEFINE(DMALLOC)
AC_DEFINE(DMALLOC_FUNC_CHECK)
INCLUDES="$CFLAGS -include \"/usr/local/include/dmalloc.h\""
LIBS="$LIBS -ldmallocth"
SHOULD_USE_WERROR=no
REDUNDANT_DECLS_WARN=no))
fi To this instead:
if test x$enable_dmalloc = xyes; then
AC_CHECK_HEADER([dmalloc.h],
dnl header found
[AC_DEFINE(DMALLOC)
AC_DEFINE(DMALLOC_FUNC_CHECK)
INCLUDES="$INCLUDES -include \"/usr/include/dmalloc.h\""
LIBS="$LIBS -ldmallocth"
SHOULD_USE_WERROR=no
REDUNDANT_DECLS_WARN=no],
dnl header not found, check local/include
dnl invalid cache
[AC_CHECK_HEADER([/usr/local/include/dmalloc.h],
dnl header found in local/include
[AC_DEFINE([DMALLOC])
AC_DEFINE([DMALLOC_FUNC_CHECK])
INCLUDES="$CFLAGS -include \"/usr/local/include/dmalloc.h\""
LIBS="$LIBS -ldmallocth"
SHOULD_USE_WERROR=no
REDUNDANT_DECLS_WARN=no] )] )
fi (Note the brackets; that's basically the only difference.) If you want a patch, I can probably generate one.
Well, hang on a minute. OpenAL is still causing problems during compilation now. Crap.
OK, that was a bad autogen.sh script. Edit support/openal/linux/autogen.sh, remove the last line, and get rid of everything after "autoheader" on the second-to-last line. So the script should basically just run autoconf and then autoheader, nothing more.
That worked, except for a couple of C++ deprecated headers, and the fact that I had to add an #include <stdarg.h> to the start of src/NCString.h, plus configure with --disable-setup.
psi42
10-17-2003, 09:25 PM
WOW :)
Hmm...
Okay, I think I did all the modifications correctly:
edited support/openal/linux/configure.in
edited support/openal/linux/autogen.sh
added #include <stdarg.h> in the correct place in src/NCString.h
ran ./configure --disable-setup && make
And it does get a lot farther...
But...
g++ -o chromium textGeometryChromium.o textGeometryBSU.o Audio.o AudioOpenAL.o
AudioSDLMixer.o Ammo.o Config.o EnemyAircraft.o EnemyAircraft_Straight.o EnemyAi
rcraft_Omni.o EnemyAircraft_RayGun.o EnemyAircraft_Tank.o EnemyAircraft_Gnat.o E
nemyAircraft_Boss00.o EnemyAircraft_Boss01.o EnemyAmmo.o EnemyFleet.o Explosions
.o HeroAircraft.o HeroAmmo.o Global.o Ground.o GroundMetal.o GroundMetalSegment.
o GroundSea.o GroundSeaSegment.o GroundSegment.o HiScore.o NCString.o MainToolki
t.o MainGLUT.o MainSDL.o MainSDL_Event.o MainGL.o MenuGL.o PowerUps.o ScreenItem
.o ScreenItemAdd.o StatusDisplay.o TexFont.o main.o -L../support/glpng/lib -L/
usr/lib -L/usr/X11R6/lib -L/usr/local/lib -lglpng -lGL -lGLU -lm -L../support/op
enal/lib -lopenal -ldl `/usr/bin/sdl-config --libs` `/usr/local/bin/smpeg-config
--libs`
../support/openal/lib/libopenal.a(posixthreads.o)(.text+0x1e0): In function `Pos
ix_AtForkThread':
threads/posixthreads.c:102: undefined reference to `pthread_atfork'
collect2: ld returned 1 exit status
make[1]: *** [chromium] Error 1
make[1]: Leaving directory `/home/maedhros/sw/Chromium-0.9/src'
make: *** [src] Error 2
I really wish I knew C++. I'm working on it though :):)
Note I don't need this to work. :) The rpm works just fine. :)
~psi42
bwkaz
10-17-2003, 11:11 PM
If you do a /usr/bin/sdl-config --libs, does it list -lpthread? What about /usr/local/bin/smpeg-config --libs? Both of those list -lpthread for me, so my Chromium compile pulled in the pthread library.
Yours didn't for some reason, so I'd guess that neither of those have -lpthread listed. You may want to edit your /usr/bin/sdl-config shell script to append -lpthread to the output (there's a --libs section in the script) if it doesn't get printed.
psi42
10-17-2003, 11:52 PM
Well...
-lpthread is listed in both......
maedhros@penguin:~$ /usr/bin/sdl-config --libs
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread
maedhros@penguin:~$ /usr/local/bin/smpeg-config --libs
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lsmpeg -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread
Interesting...
bwkaz
10-18-2003, 09:20 AM
What does nm /lib/libpthread.so* | grep pthread_atfork tell you?
I wonder if pthread_atfork was deprecated in later versions of glibc or something. The system I compiled it on has glibc 2.2.5, which is fairly old by now.
psi42
10-20-2003, 12:02 AM
maedhros@penguin:~$ nm /lib/libpthread.so* | grep pthread_atfork
0000d670 t __dyn_pthread_atfork
0000d670 W pthread_atfork@GLIBC_2.0
bwkaz
10-20-2003, 06:51 PM
OK, that's part of the problem at least. I get this:
$ nm /lib/libpthread.so* | grep pthread_atfork
000078f0 T __pthread_atfork
000078f0 T pthread_atfork
00013068 d pthread_atfork_child
00013048 d pthread_atfork_lock
00013064 d pthread_atfork_parent
00013060 d pthread_atfork_prepare What does /lib/libc.so tell you about glibc's version? Does it say something about "linuxthreads addon" (by Xavier Leroy), or is it using NPTL (by Ulrich Drepper)?
Do you find anything else if you change /lib/libpthread.so* to /lib/*.so*?
psi42
10-20-2003, 07:19 PM
/lib/libc.so.6 shows the linuxthreads-0.10 extension:
(There is no /lib/libc.so, just /lib/libc.so.6)
maedhros@penguin:~$ /lib/libc.so.6
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.2.3.
Compiled on a Linux 2.4.20 system on 2003-05-18.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to <bugs@gnu.org>.
and...
maedhros@penguin:~$ nm /lib/*.so* | grep pthread_atfork
nm: /lib/libblkid.so.1: no symbols
nm: /lib/libblkid.so.1.0: no symbols
nm: /lib/libbz2.so.1.0: no symbols
nm: /lib/libbz2.so.1.0.2: no symbols
nm: /lib/libcom_err.so.2: no symbols
nm: /lib/libcom_err.so.2.1: no symbols
nm: /lib/libdb-3.1.so: no symbols
nm: /lib/libdb-3.3.so: no symbols
nm: /lib/libe2p.so.2: no symbols
nm: /lib/libe2p.so.2.3: no symbols
nm: /lib/libext2fs.so.2: no symbols
nm: /lib/libext2fs.so.2.4: no symbols
nm: /lib/libgpm.so.1: no symbols
nm: /lib/libgpm.so.1.18.0: no symbols
nm: /lib/liblvm-10.so: no symbols
nm: /lib/liblvm-10.so.1: no symbols
nm: /lib/liblvm-10.so.1.0: no symbols
nm: /lib/libncurses.so.5: no symbols
nm: /lib/libncurses.so.5.3: no symbols
nm: /lib/libproc.so.2.0.16: no symbols
0000d670 t __dyn_pthread_atfork
0000d670 W pthread_atfork@GLIBC_2.0
0000d670 t __dyn_pthread_atfork
0000d670 W pthread_atfork@GLIBC_2.0
00005510 t __pthread_atfork
00005510 t pthread_atfork
00005510 t __pthread_atfork
00005510 t pthread_atfork
nm: /lib/libss.so.2: no symbols
nm: /lib/libss.so.2.0: no symbols
nm: /lib/libtermcap.so.2: no symbols
nm: /lib/libtermcap.so.2.0.8: no symbols
nm: /lib/libuuid.so.1: no symbols
nm: /lib/libuuid.so.1.2: no symbols
hmm... :confused:
bwkaz
10-20-2003, 09:21 PM
OK, you have a newer glibc, that might be part of it anyway.
But something does have the pthread_atfork function defined in it. It's just a question of finding out which file listed it... hmm.
Maybe:
for lib in /lib/*.so* ; do nm $lib | grep "t pthread_atfork" && echo $lib ; done
would help? (I should have posted that last time...) It'll print the filename after the symbol, if it's found.
If you take the "lib" off the start of the filename, and take the .so* off the end, you'll get the name that the linker knows this library by. If you then add -l<that name> (that's dash, ell, then the linker lib name) to the link command line (I'll show you how to edit the Makefile once I know what the library is), then gcc should link in the file properly. But it all hinges on knowing the filename first.
psi42
10-21-2003, 12:44 AM
maedhros@penguin:~$ for lib in /lib/*.so* ; do nm $lib | grep "t pthread_atfork" && echo $lib ; done
nm: /lib/libblkid.so.1: no symbols
nm: /lib/libblkid.so.1.0: no symbols
nm: /lib/libbz2.so.1.0: no symbols
nm: /lib/libbz2.so.1.0.2: no symbols
nm: /lib/libcom_err.so.2: no symbols
nm: /lib/libcom_err.so.2.1: no symbols
nm: /lib/libdb-3.1.so: no symbols
nm: /lib/libdb-3.3.so: no symbols
nm: /lib/libe2p.so.2: no symbols
nm: /lib/libe2p.so.2.3: no symbols
nm: /lib/libext2fs.so.2: no symbols
nm: /lib/libext2fs.so.2.4: no symbols
nm: /lib/libgpm.so.1: no symbols
nm: /lib/libgpm.so.1.18.0: no symbols
nm: /lib/liblvm-10.so: no symbols
nm: /lib/liblvm-10.so.1: no symbols
nm: /lib/liblvm-10.so.1.0: no symbols
nm: /lib/libncurses.so.5: no symbols
nm: /lib/libncurses.so.5.3: no symbols
nm: /lib/libproc.so.2.0.16: no symbols
00005510 t pthread_atfork
/lib/librt-2.3.2.so
00005510 t pthread_atfork
/lib/librt.so.1
nm: /lib/libss.so.2: no symbols
nm: /lib/libss.so.2.0: no symbols
nm: /lib/libtermcap.so.2: no symbols
nm: /lib/libtermcap.so.2.0.8: no symbols
nm: /lib/libuuid.so.1: no symbols
nm: /lib/libuuid.so.1.2: no symbols
Looks like it found pthread_atfork in librt.so.1 and librt-2.3.2.so
.......
bwkaz
10-21-2003, 07:07 PM
librt? Are you sure this isn't a Solaris box? :p
Anywhoo, you can fix the problem by editing the sdl-config script so that it adds "-lrt" (that's dash, ell, r, t) to the end of its output when its argument is --libs. Then run /usr/bin/sdl-config --libs just to make sure the change took, and then try to make chromium again.
If you can't get the sdl-config script working right, then edit the top-level config.mak file, and add -lrt to the end of either SDL_LIBS or SMPEG_LIBS.
psi42
10-21-2003, 10:39 PM
Maybe I'm just doing this wrong.
I added -lrt into sdl-config, so now when I run sdl-config --libs I get:
maedhros@penguin:~/sw/Chromium-0.9$ /usr/bin/sdl-config --libs
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lrt
But the compile still fails on the same error
Here is what sdl-config looks like, now that I changed it:
#!/bin/sh
prefix=/usr
exec_prefix=${prefix}
exec_prefix_set=no
usage="\
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo 1.2.6
;;
--cflags)
echo -I${prefix}/include/SDL -D_REENTRANT
# The portable way of including SDL is #include "SDL.h"
#if test ${prefix}/include != /usr/include ; then
# # Handle oddities in Win32 path handling (assumes prefix)
# prefix=`echo ${prefix} | sed 's,^//\([A-Z]\),\1:,'`
#
# includes=-I${prefix}/include
#fi
#echo $includes -I${prefix}/include/SDL -D_REENTRANT
;;
--libs)
libdirs="-L${exec_prefix}/lib -Wl,-rpath,${exec_prefix}/lib"
echo $libdirs -lSDL -lpthread -lrt
;;
--static-libs)
# --libs|--static-libs)
libdirs="-L${exec_prefix}/lib -Wl,-rpath,${exec_prefix}/lib"
echo $libdirs -lSDL -lpthread -lm -ldl -lasound -L/usr/X11R6/lib -lX11 -lXext
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
What I did was I changed
--libs)
libdirs="-L${exec_prefix}/lib -Wl,-rpath,${exec_prefix}/lib"
echo $libdirs -lSDL -lpthread
;;
to
--libs)
libdirs="-L${exec_prefix}/lib -Wl,-rpath,${exec_prefix}/lib"
echo $libdirs -lSDL -lpthread -lrt
;;
I also tried editing config.mak
This is what I did, maybe I did it wrong:
OPENAL_CONFIG_OPTS = ./configure --enable-sdl --enable-smpeg
SDL_CONFIG = /usr/bin/sdl-config
SMPEG_CONFIG = /usr/local/bin/smpeg-config
AL_CFLAGS = -I../support/openal/linux/include -I../support/openal/include
SDL_CFLAGS = `$(SDL_CONFIG) --cflags` -DUSE_SDL
SMPEG_CFLAGS = `$(SMPEG_CONFIG) --cflags`
PKG_CFLAGS =
GL_LIBS = -lglpng -lGL -lGLU -lm
AL_LIBS = -L../support/openal/lib -lopenal -ldl
SDL_LIBS = `$(SDL_CONFIG) --libs` -lrt
SMPEG_LIBS = `$(SMPEG_CONFIG) --libs` -lrt
VORBIS_LIBS =
But still:
g++ -o chromium textGeometryChromium.o textGeometryBSU.o Audio.o AudioOpenAL.o AudioSDLMixer.o Ammo.o Config.o
EnemyAircraft.o EnemyAircraft_Straight.o EnemyAircraft_Omni.o EnemyAircraft_RayGun.o EnemyAircraft_Tank.o
EnemyAircraft_Gnat.o EnemyAircraft_Boss00.o EnemyAircraft_Boss01.o EnemyAmmo.o EnemyFleet.o Explosions.o
HeroAircraft.o HeroAmmo.o Global.o Ground.o GroundMetal.o GroundMetalSegment.o GroundSea.o
GroundSeaSegment.o GroundSegment.o HiScore.o NCString.o MainToolkit.o MainGLUT.o MainSDL.o MainSDL_Event.o
MainGL.o MenuGL.o PowerUps.o ScreenItem.o ScreenItemAdd.o StatusDisplay.o TexFont.o main.o
-L../support/glpng/lib -L/usr/lib -L/usr/X11R6/lib -L/usr/local/lib -lglpng -lGL -lGLU
-lm -L../support/openal/lib -lopenal -ldl `/usr/bin/sdl-config --libs` -lrt
`/usr/local/bin/smpeg-config --libs` -lrt
../support/openal/lib/libopenal.a(posixthreads.o)(.text+0x1e0): In function `Posix_AtForkThread':
threads/posixthreads.c:102: undefined reference to `pthread_atfork'
collect2: ld returned 1 exit status
make[1]: *** [chromium] Error 1
make[1]: Leaving directory `/home/maedhros/sw/Chromium-0.9/src'
make: *** [src] Error 2
:(
bwkaz
10-22-2003, 09:18 PM
FYI: I've edited your post so that it's not so wide. ;)
But I don't know what the deal is with this. You didn't edit stuff wrong, it just didn't seem to help any.
Maybe the libopenal.a file needs to be linked differently? Try a make distclean *in* the support/openal/linux directory, and then export LDFLAGS="-lrt" before going back to the top-level Chromium-0.9 directory and rerunning make.
If that still doesn't help, then try editing config.mak one more time. Change this line:
AL_LIBS = -L../support/openal/lib -lopenal -ldl to this instead:
AL_LIBS = ../support/openal/lib/libopenal.a -ldl I had to do this anyway, since Chromium was linking against my system-installed libopenal instead of the one in support/openal/lib, and the two were not compatible.
psi42
10-22-2003, 09:31 PM
Okay, I did make distclean in support/openal/linux, and then ran [b]export LDFLAGS="-lrt"[b]
Then I tried compiling again, but still got the same error.
I made the modifications to config.mak, but I'm still getting the same error.
:(
bwkaz
10-22-2003, 10:22 PM
Switch the order of -lrt and -lpthread in the sdl-config script perhaps?
I don't know anymore; I'm grasping at straws now... :(
psi42
10-23-2003, 08:43 PM
Nope, no luck. :(
Thanks anyway for all the help!
philtesone
12-05-2003, 09:04 PM
I followed the directions from the offical chromium website
but got stumped at:
Set CHROMIUM_DATA environment variable to point to data directory ( i.e. Chromium-0.9/data )
now I know where the data dir is, but where do I set the CHROMIUM_DATA environmet???
This is on my Slackware 9.1 machine. . .
psi42
12-05-2003, 09:29 PM
I followed the directions from the offical chromium website
but got stumped at:
Set CHROMIUM_DATA environment variable to point to data directory ( i.e. Chromium-0.9/data )
now I know where the data dir is, but where do I set the CHROMIUM_DATA environmet???
This is on my Slackware 9.1 machine. . .
you can set it with the export command
export CHROMIUM_DATA=/path/to/Chromium-0.9/data
although I think it tries by default the data folder in the source folder so it should work without it.
Anyway if you do get it to compile, let me know. :)
Good luck,
~psi42
philtesone
12-05-2003, 09:40 PM
well that's certianly good to know!
I wonder why they didn't just say that on their website
I will try it tommorrow
thanx for the info, and so quick too :)