readdir_r-problem on Solaris 2.5.1

Martin Kahlert martin.kahlert@infineon.com
Sun Aug 25 23:56:00 GMT 2002


Hi!

On Thu, Aug 22, 2002 at 08:08:40AM +0200, Martin Kahlert wrote:
> Hi!
> I tried building libjava (gcc-3.2 release) on a Solaris 2.5.1 box.
> Here is the error:
> /data/titan_3/kahlert/Ultra/OBJ/gcc/xgcc -shared-libgcc -B/data/titan_3/kahlert/Ultra/OBJ/gcc/ -nostdinc++ -L/data/titan_3/kahlert/Ultra/OBJ/sparc-sun-solaris2.5.1/libstdc++-v3/src -L/data/titan_3/kahlert/Ultra/OBJ/sparc-sun-solaris2.5.1/libstdc++-v3/src/.libs -B/home/software/GCC3.2/ULTRA/sparc-sun-solaris2.5.1/bin/ -B/home/software/GCC3.2/ULTRA/sparc-sun-solaris2.5.1/lib/ -isystem /home/software/GCC3.2/ULTRA/sparc-sun-solaris2.5.1/include -DHAVE_CONFIG_H -I. -I../../../gcc-3.2/libjava -I./include -I./gcj -I../../../gcc-3.2/libjava -Iinclude -I../../../gcc-3.2/libjava/include -I../../../gcc-3.2/libjava/../boehm-gc/include -DSILENT=1 -DNO_SIGNALS=1 -DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1 -I../../../gcc-3.2/libjava/libltdl -I../../../gcc-3.2/libjava/libltdl -I../../../gcc-3.2/libjava/.././libjava/../gcc -I../../../gcc-3.2/libjava/../zlib -I../../../gcc-3.2/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -I/server/local/X11R5Sol2/include -W -Wall -D_GNU_SOURCE -DPREFIX=\"/home/software/GCC3.2\" -g -O2 -MD -MT java/io/natFile.lo -MF java/io/natFile.pp -c java/io/natFile.cc  -fPIC -DPIC -o java/io/natFile.o
> /usr/include/dirent.h: In member function `JArray<java::lang::Object*>*
>    java::io::File::performList(java::io::FilenameFilter*,
>    java::io::FileFilter*, java::lang::Class*)':
> /usr/include/dirent.h:109: too many arguments to function `dirent*
>    readdir_r(DIR*, dirent*)'
> java/io/natFile.cc:151: at this point in file
> gmake[3]: *** [java/io/natFile.lo] Error 1
> gmake[3]: Leaving directory `/data/titan_3/kahlert/Ultra/OBJ/sparc-sun-solaris2.5.1/libjava'
> gmake[2]: *** [all-recursive] Error 1
> gmake[2]: Leaving directory `/data/titan_3/kahlert/Ultra/OBJ/sparc-sun-solaris2.5.1/libjava'
> gmake[1]: *** [all-target-libjava] Error 2
> gmake[1]: Leaving directory `/data/titan_3/kahlert/Ultra/OBJ'
> gmake: *** [bootstrap] Error 2

Ok, seems that i have to talk to me, this way arguing is much easier ;-)
But perhaps it's interesting for people of later centuries:

I got a working gcj-3.2 on Solaris 2.5.1 (hello world type - my main
application will compile during the next several hours) by this ugly
hack:

--- /home/kahlert/gcc-3.2/libjava/Makefile.in	Mon Aug 19 11:23:20 2002
+++ Makefile.in	Fri Aug 23 08:08:14 2002
@@ -1662,7 +1662,7 @@
 LTLIBRARIES =  $(toolexeclib_LTLIBRARIES)
 
 
-DEFS = @DEFS@ -I. -I$(srcdir) -I./include -I./gcj
+DEFS = @DEFS@ -D_POSIX_PTHREAD_SEMANTICS -I. -I$(srcdir) -I./include -I./gcj 
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@

I tried 
gmake LIBCFLAGS='-g -O2 -D_POSIX_PTHREAD_SEMANTICS' \
      LIBCXXFLAGS='-g -O2 -fno-implicit-templates -D_POSIX_PTHREAD_SEMANTICS'\
      bootstrap
(among some other possibilities with export CFLAGS=....) but the 
-D_POSIX_PTHREAD_SEMANTICS did not make it into the compilation flags for
libjava. What is the correct way for this?

Perhaps the problem came up because i configured with --disable-threads?

Thanks for any help
Martin.

-- 
The early bird catches the worm. If you want something else for       
breakfast, get up later.



More information about the Java mailing list