[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with 1.3.4
From: |
bug-gnustep-admin |
Subject: |
Problems with 1.3.4 |
Date: |
Thu, 18 Jul 2002 13:34:12 +0200 (CEST) |
On 2002-07-04 09:41:28 -0600 Adam Fedor <fedor@doc.com> wrote:
> The GNUstep Makefile Package version 1.3.4 and GNUstep Base Library
> versiion 1.3.4 is now available. This is a prerelease for version 1.4.0.
> Please try to test this as much as possible in the next few weeks.
I tried to test 1.3.4 on available systems (ix86-pc-mingw,
ix86-SuSE-linux, powerpc-SuSE-linux, sparc-sun-solaris,
powerpc-apple-darwin and mips-sgi-irix) and I found a few problems:
On mingw, I'm unable to compile gnustep-base1.3.4 - make reports the
following:
...
Compiling file NSFileManager.m ...
NSFileManager.m: In function `-[NSFileManager(PrivateMethods)
_attributesAtPath:traverseLink:forCopy:]':
NSFileManager.m:2384: warning: implicit declaration of function `setgrent'
NSFileManager.m:2385: warning: implicit declaration of function `getgrent'
NSFileManager.m:2385: warning: assignment makes pointer from integer
without a cast
NSFileManager.m:2387: dereferencing pointer to incomplete type
NSFileManager.m:2394: dereferencing pointer to incomplete type
NSFileManager.m:2400: warning: implicit declaration of function `endgrent'
NSFileManager.m:2419: warning: unused variable `u'
make[2]: *** [shared_obj/ix86/mingw32/gnu-gnu-gnu/NSFileManager.o] Error 1
make[1]: *** [libgnustep-base.all.library.variables] Error 2
make[1]: Leaving directory `/home/ceh/Projects/gnustep-base-1.3.4/Source'
make: *** [internal-all] Error 2
Since I'm still unable to compile anything with nx-gnu-gnu on darwin5
which doesn't report "Bus error" or "segmentation fault", I produced a
working shared gnu-gnu-gnu library; these changes to target.make are
necessary:
####################################################
#
# MacOSX 10.1.1, darwin5.1
#
ifeq ($(findstring darwin5, $(GNUSTEP_TARGET_OS)), darwin5)
ifeq ($(OBJC_RUNTIME), NeXT)
HAVE_BUNDLES = yes
OBJC_COMPILER = NeXT
endif
HAVE_SHARED_LIBS = yes
SHARED_LIBEXT = .dylib
ifeq ($(FOUNDATION_LIB),nx)
# Use the NeXT compiler
CC = cc
INTERNAL_OBJCFLAGS += -traditional-cpp
ifneq ($(arch),)
ARCH_FLAGS = $(foreach a, $(arch), -arch $(a))
INTERNAL_OBJCFLAGS += $(ARCH_FLAGS)
INTERNAL_CFLAGS += $(ARCH_FLAGS)
INTERNAL_LDFLAGS += $(ARCH_FLAGS)
endif
endif
ifeq ($(FOUNDATION_LIB),gnu)
# Set flags to ignore the MacOSX headers
INTERNAL_OBJCFLAGS +=
endif
TARGET_LIB_DIR = \
Libraries/$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/$(LIBRARY_COMBO)
DYLIB_COMPATIBILITY_VERSION = -compatibility_version 1
DYLIB_CURRENT_VERSION = -current_version 1
DYLIB_INSTALL_NAME = \
$(GNUSTEP_SYSTEM_ROOT)/$(TARGET_LIB_DIR)/$(LIBRARY_FILE)
# Remove empty dirs from the compiler/linker flags (ie, remove -Idir and
# -Ldir flags where dir is empty).
REMOVE_EMPTY_DIRS = yes
ifeq ($(FOUNDATION_LIB),nx)
DYLIB_DEF_FRAMEWORKS += -framework Foundation
endif
ifneq ($(OBJC_COMPILER), NeXT)
# GNU compiler
DYLIB_DEF_FRAMEWORKS +=
SHARED_LD_PREFLAGS += -arch_only ppc -noall_load
SHARED_LIB_LINK_CMD = \
/usr/bin/libtool -flat_namespace -undefined warning \
$(SHARED_LD_PREFLAGS) \
$(ARCH_FLAGS) -dynamic \
$(DYLIB_COMPATIBILITY_VERSION) \
$(DYLIB_CURRENT_VERSION) \
-install_name $(DYLIB_INSTALL_NAME) \
-o $@ \
$(DYLIB_DEF_FRAMEWORKS) \
$(INTERNAL_LIBRARIES_DEPEND_UPON)
$(LIBRARIES_FOUNDATION_DEPEND_UPON) \
$^ $(SHARED_LD_POSTFLAGS); \
(cd $(GNUSTEP_OBJ_DIR); rm -f $(LIBRARY_FILE); \
$(LN_S) $(VERSION_LIBRARY_FILE) $(LIBRARY_FILE))
HAVE_BUNDLES = no
BUNDLE_LD = /usr/bin/ld
BUNDLE_CFLAGS += -fno-common
BUNDLE_LDFLAGS += -dynamic -flat_namespace -undefined warning
$(ARCH_FLAGS)
else # OBJC_COMPILER=NeXT
DYLIB_EXTRA_FLAGS = -read_only_relocs warning -undefined warning
-fno-common
#DYLIB_DEF_FRAMEWORKS += -framework Foundation
DYLIB_DEF_LIBS = -lobjc
SHARED_LIB_LINK_CMD = \
$(CC) $(SHARED_LD_PREFLAGS) \
-dynamiclib $(ARCH_FLAGS) -dynamic \
$(DYLIB_COMPATIBILITY_VERSION) \
$(DYLIB_CURRENT_VERSION) \
$(DYLIB_EXTRA_FLAGS) \
-install_name $(DYLIB_INSTALL_NAME) \
-o $@ \
$(INTERNAL_LIBRARIES_DEPEND_UPON)
$(LIBRARIES_FOUNDATION_DEPEND_UPON) \
$(DYLIB_DEF_FRAMEWORKS) \
$(DYLIB_DEF_LIBS) \
$^ $(SHARED_LD_POSTFLAGS); \
(cd $(GNUSTEP_OBJ_DIR); rm -f $(LIBRARY_FILE); \
$(LN_S) $(VERSION_LIBRARY_FILE) $(LIBRARY_FILE))
SHARED_CFLAGS += -dynamic
BUNDLE_LD = $(CC)
BUNDLE_CFLAGS +=
BUNDLE_LDFLAGS += -bundle -undefined error $(ARCH_FLAGS)
endif # OBJC_COMPILER
OBJ_MERGE_CMD = \
$(CC) -nostdlib -r -d -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT)
$^ ;
STATIC_LIB_LINK_CMD = \
/usr/bin/libtool $(STATIC_LD_PREFLAGS) -static $(ARCH_FLAGS) -o $@
$^ \
$(STATIC_LD_POSTFLAGS)
AFTER_INSTALL_STATIC_LIB_COMMAND = \
(cd $(FINAL_LIBRARY_INSTALL_DIR); \
$(RANLIB) $(VERSION_LIBRARY_FILE))
SHARED_CFLAGS += -fno-common
endif
#
# end MacOSX 10.1.1, darwin5.1
#
####################################################
And here are the final instructions for ffcall (before, it did't work for
the shared base library):
tar xf ffcall-1.8d.tar
cd ffcall-1.8d
configure
cd avcall
rm avcall-rs6000-sysv4.s
gcc avcall-rs6000.c -S -o avcall-rs6000-sysv4.s
make
make install-lib
cd ../callback/trampoline_r
ln -s trampoline_r.h.in trampoline_r.h
rm cache-rs6000-sysv4.s tramp-rs6000-sysv4.s
gcc cache.c -S -o cache-rs6000-sysv4.s
gcc trampoline.c -S -o tramp-rs6000-sysv4.s
cd ../vacall_r
rm vacall-rs6000-sysv4.s
gcc vacall-rs6000.c -S -o vacall-rs6000-sysv4.s -DREENTRANT
make
gcc -c misc.c -fno-common
ar cru .libs/libvacall.a vacall.o misc.o structcpy.o
cd ..
make
make install-lib
To compile gnustep-base, the following has to be changed in NSDecimal.m:
#include <math.h>
#if !defined(__APPLE__) || !defined(GNU_RUNTIME)
#include <ctype.h>
#endif
#include <Foundation/NSDecimal.h>
#include <Foundation/NSString.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSUserDefaults.h>
Only bundles don't work:
The test for global constructors in configure fails and running
Testing/obj/nsbundle reports:
...
Retreiving principal class...
Error (objc-load): Cannot initialize dynamic linker
* ERROR: Can't find principal class
For irix6.5, changes have to be made in target.make:
#
# Target specific libraries
#
...
ifeq ($(findstring irix, $(GNUSTEP_TARGET_OS)), irix)
ifeq ("$(objc_threaded)","")
TARGET_SYSTEM_LIBS := $(CONFIG_SYSTEM_LIBS) -lm
else
INTERNAL_CFLAGS = -D_REENTRANT
INTERNAL_OBJCFLAGS = -D_REENTRANT
TARGET_SYSTEM_LIBS := $(CONFIG_SYSTEM_LIBS) $(objc_threaded) -lm
endif
endif
(This helps, if gcc supports posix threads)
And instead of two sections called IRIX, the following one is needed
(Bundles, static and shared libraries work on Irix6.5):
####################################################
#
# IRIX
#
ifeq ($(findstring irix, $(GNUSTEP_TARGET_OS)), irix)
HAVE_SHARED_LIBS = yes
STATIC_LIB_LINK_CMD = \
(cd $(GNUSTEP_OBJ_DIR); $(AR) $(ARFLAGS) \
$(VERSION_LIBRARY_FILE) `ls -1 *\.o */*\.o`);\
$(RANLIB) $(VERSION_LIBRARY_FILE)
SHARED_LIB_LINK_CMD = \
(cd $(GNUSTEP_OBJ_DIR); $(CC) -v $(SHARED_LD_PREFLAGS)
$(SHARED_CFLAGS) -shared -o $(VERSION_LIBRARY_FILE) `ls -1 *\.o`
$(INTERNAL_LIBRARIES_DEPEND_UPON) $(SHARED_LD_POSTFLAGS);\
rm -f $(LIBRARY_FILE); \
$(LN_S) $(VERSION_LIBRARY_FILE) $(LIBRARY_FILE))
SHARED_CFLAGS += -fPIC
SHARED_LIBEXT = .so
HAVE_BUNDLES = yes
BUNDLE_LD = $(CC)
BUNDLE_CFLAGS += -fPIC
BUNDLE_LDFLAGS += -shared
endif
# end IRIX
#
####################################################
Unfortunately, subproject.o in subdirectory Additions will not be linked
by make and I only found a workaround:
cd gnustep-base-1.3.4/Source/Additions/shared_obj/mips/irix6.5/gnu-gnu-gnu
(or cd
gnustep-base-1.3.4/Source/Additions/static_obj/mips/irix6.5/gnu-gnu-gnu)
ld -o subproject.o -r GSMime.o GSXML.o
cp subproject.o ../../../../../shared_obj/mips/irix6.5/gnu-gnu-gnu
(or cp subproject.o ../../../../../static_obj/mips/irix6.5/gnu-gnu-gnu)
Does anybody know how to solve this problem, which also affects cygwin?
linux and solaris seem to work.
Carl Eugen
cehoyos AT rainbow DOT studorg DOT tuwien DOT ac DOT at
- Problems with 1.3.4,
bug-gnustep-admin <=