|
From: | Andreas Höschler |
Subject: | Re: GNUstep build problem |
Date: | Thu, 7 Jan 2010 23:35:10 +0100 |
Hi all,
I tried both, make and gmake, both with the same result Linking library libgnustep-base ... Text relocation remains referenced against symbol offset in file<unknown> 0x11 /usr/local/lib/libcallback.a(misc.o) <unknown> 0x3e /usr/local/lib/libcallback.a(misc.o) <unknown> 0x8b /usr/local/lib/libcallback.a(trampoline.o) free 0x51 /usr/local/lib/libcallback.a(trampoline.o) abort 0x22 /usr/local/lib/libcallback.a(misc.o) abort 0x4f /usr/local/lib/libcallback.a(misc.o) abort 0x95 /usr/local/lib/libcallback.a(trampoline.o) fprintf 0x1d /usr/local/lib/libcallback.a(misc.o) fprintf 0x4a /usr/local/lib/libcallback.a(misc.o) __iob 0x18 /usr/local/lib/libcallback.a(misc.o) __iob 0x45 /usr/local/lib/libcallback.a(misc.o) __iob 0x74 /usr/local/lib/libcallback.a(trampoline.o) fwrite 0x90 /usr/local/lib/libcallback.a(trampoline.o) malloc 0x66 /usr/local/lib/libcallback.a(trampoline.o) ld: fatal: relocations remain against allocatable but non-writable sectionscollect2: ld returned 1 exit status gmake[3]: *** [obj/libgnustep-base.so.1.19.3] Error 1 gmake[2]: *** [internal-library-all_] Error 2 gmake[1]: *** [libgnustep-base.all.library.variables] Error 2 gmake: *** [internal-all] Error 2 Any one success on Solaris with a recent GNustep release?I have googled and found of on http://www.phpman.info/index.php/info/gcc the hint:`-mimpure-text' `-mimpure-text', used in addition to `-shared', tells the compiler to not pass `-z text' to the linker when linking a shared object. Using this option, you can link position-dependent code into a shared object. `-mimpure-text' suppresses the "relocations remain against allocatable but non-writable sections" linker error message. However, the necessary relocations will trigger copy-on-write, and the shared object is not actually shared across processes. Instead of using `-mimpure-text', you should compile all source code with `-fpic' or `-fPIC'. This option is only available on SunOS and Solaris.If I understand this correct this tells me to either use the -mimpure-text or fpic option with gcc. However, how do I tell make to use this option when doingcd base./configure --with-openssl-include=/usr/local/ssl/include --with-openssl-library=/usr/local/ssl/libmake ?
OK, I finally managed to get base installed by doing cd base ... makemake fails in the linking process. I use "make messages=yes" to see what he is doing and add the -mimpure-text option by manually calling
cd /usr/share/src/core/gnustep-base-1.19.3/Sourcegcc -mimpure-text -shared -Wl,-h,libgnustep-base.so.1.19 -o ./obj/libgnustep-base.so.1.19.3 obj/GSLocale.m.o obj/preface.m.o obj/mframe.m.o obj/synchronization.m.o obj/callframe.m.o obj/GSArray.m.o obj/GSAttributedString.m.o obj/GSConcreteValue.m.o obj/GSCountedSet.m.o obj/GSDictionary.m.o obj/GSFormat.m.o obj/GSFTPURLHandle.m.o obj/GSHTTPAuthentication.m.o obj/GSHTTPURLHandle.m.o obj/GSRunLoopWatcher.m.o obj/GSSet.m.o obj/GSSocketStream.m.o obj/GSStream.m.o obj/GSString.m.o obj/GSValue.m.o obj/NSAffineTransform.m.o obj/NSArchiver.m.o obj/NSArray.m.o obj/NSAssertionHandler.m.o obj/NSAttributedString.m.o obj/NSAutoreleasePool.m.o obj/NSBundle.m.o obj/NSCache.m.o obj/NSCachedURLResponse.m.o obj/NSCalendarDate.m.o obj/NSCallBacks.m.o obj/NSCharacterSet.m.o obj/NSClassDescription.m.o obj/NSCoder.m.o obj/NSCopyObject.m.o obj/NSCountedSet.m.o obj/NSConcreteHashTable.m.o obj/NSConcreteMapTable.m.o obj/NSConcreteNumber.m.o obj/NSConnection.m.o obj/NSData.m.o obj/NSDate.m.o obj/NSDateFormatter.m.o obj/NSDebug.m.o obj/NSDecimal.m.o obj/NSDecimalNumber.m.o obj/NSDictionary.m.o obj/NSDistantObject.m.o obj/NSDistributedLock.m.o obj/NSDistributedNotificationCenter.m.o obj/NSEnumerator.m.o obj/NSError.m.o obj/NSException.m.o obj/NSFileHandle.m.o obj/NSFileManager.m.o obj/NSFormatter.m.o obj/NSGarbageCollector.m.o obj/NSGeometry.m.o obj/NSHashTable.m.o obj/NSHost.m.o obj/NSHTTPCookie.m.o obj/NSHTTPCookieStorage.m.o obj/NSIndexPath.m.o obj/NSIndexSet.m.o obj/NSInvocation.m.o obj/NSKeyedArchiver.m.o obj/NSKeyedUnarchiver.m.o obj/NSKeyValueCoding.m.o obj/NSKeyValueObserving.m.o obj/NSLock.m.o obj/NSLog.m.o obj/NSMapTable.m.o obj/NSMethodSignature.m.o obj/NSNotification.m.o obj/NSNotificationCenter.m.o obj/NSNotificationQueue.m.o obj/NSNull.m.o obj/NSNumber.m.o obj/NSNumberFormatter.m.o obj/NSObjCRuntime.m.o obj/NSObject.m.o obj/NSObject+NSComparisonMethods.m.o obj/NSOperation.m.o obj/NSPage.m.o obj/NSPathUtilities.m.o obj/NSPipe.m.o obj/NSPointerArray.m.o obj/NSPointerFunctions.m.o obj/NSConcretePointerFunctions.m.o obj/NSPort.m.o obj/NSPortCoder.m.o obj/NSPortMessage.m.o obj/NSPortNameServer.m.o obj/NSPredicate.m.o obj/NSProcessInfo.m.o obj/NSPropertyList.m.o obj/NSProtocolChecker.m.o obj/NSProxy.m.o obj/NSRange.m.o obj/NSRunLoop.m.o obj/NSScanner.m.o obj/NSSerializer.m.o obj/NSSet.m.o obj/NSSocketPort.m.o obj/NSSocketPortNameServer.m.o obj/NSSortDescriptor.m.o obj/NSSpellServer.m.o obj/NSString.m.o obj/NSTask.m.o obj/NSThread.m.o obj/NSTimer.m.o obj/NSTimeZone.m.o obj/NSUnarchiver.m.o obj/NSUndoManager.m.o obj/NSURL.m.o obj/NSURLAuthenticationChallenge.m.o obj/NSURLCache.m.o obj/NSURLCredential.m.o obj/NSURLConnection.m.o obj/NSURLCredentialStorage.m.o obj/NSURLDownload.m.o obj/NSURLProtectionSpace.m.o obj/NSURLProtocol.m.o obj/NSURLRequest.m.o obj/NSURLResponse.m.o obj/NSURLHandle.m.o obj/NSUserDefaults.m.o obj/NSValue.m.o obj/NSValueTransformer.m.o obj/NSXMLDocument.m.o obj/NSXMLDTD.m.o obj/NSXMLDTDNode.m.o obj/NSXMLElement.m.o obj/NSXMLNode.m.o obj/NSXMLParser.m.o obj/NSZone.m.o obj/externs.m.o obj/objc-load.m.o obj/GSFileHandle.m.o obj/NSMessagePort.m.o obj/NSMessagePortNameServer.m.o obj/GSFFCallInvocation.m.o Additions/obj/subproject.o unix/obj/subproject.o -L./obj -L//GNUstep/Library/Libraries -L/opt/GNUstep/Local/Library/Libraries -L/opt/GNUstep/System/Library/Libraries -L/opt/GNUstep/System/Library/Libraries -L/opt/GNUstep/Local/Library/Libraries -lobjc -lgmp -L/usr/local/lib -R/usr/local/lib -lxml2 -lz -lpthread -liconv -lm -lsocket -lnsl -liconv -lcallback -lavcall -lnsl -liberty -ldl -lz -lsocket -lnsl -lm && (cd ./obj; rm -f libgnustep-base.so; if [ "libgnustep-base.so.1.19" != "libgnustep-base.so.1.19.3" ]; then rm -f libgnustep-base.so.1.19; ln -s libgnustep-base.so.1.19.3 libgnustep-base.so.1.19; fi; ln -s libgnustep-base.so.1.19 libgnustep-base.so; )
cd /usr/share/src/core/gnustep-base-1.19.3 make install This got the thing installed. The recommendation though was "you should compile all source code with `-fpic' or `-fPIC'." How can I make gcc use this option for everything it does? Thanks, Andreas
[Prev in Thread] | Current Thread | [Next in Thread] |