Can compile gnustep-base on a Raspberry Pi now. The first time I've been able to compile gnustep-base. However binaries built using gnustep-base are segfaulting 1. The gnustep-base package won't compile unless the libiconv package being installed. So the libiconv needs to be added as a hard dependency, which it isn't at the moment. 2. GNU step binaries are segfaulting when they call into the Foundation library. For instance if I create GNUstep "Hello World" program and call printf("Hello World"), this runs. However if I change the printf call to NSLog(@"Hello World"), the program segfaults. # uname -a FreeBSD raspberry-pi 10.1-RC1 FreeBSD 10.1-RC1 #0 r272463: Fri Oct 3 07:27:18 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI-B arm Compiled libobjc2 and gnustep-base with the following environment variables set:- WITH_DEBUG=yes CFLAGS=-integrated-as source.m ----------------------- #include <Foundation/Foundation.h> int main (int argc, char ** argv) { NSLog(@"Hello world..."); } GNUmakefile ----------------------- include $(GNUSTEP_MAKEFILES)/common.make debug=yes ${TOOL_NAME}_OBJCFLAGS = -fobjc-arc TOOL_NAME = hello hello_OBJC_FILES = source.m include $(GNUSTEP_MAKEFILES)/tool.make Compilation... ---------- $ ls GNUmakefile obj source.m $ game This is gnustep-make 2.6.6. Type 'gmake print-gnustep-make-help' for help. Making all for tool hello... Compiling file source.m ... Linking tool hello ... $ ./obj/hello Segmentation fault (core dumped) gdb -------------- $ gdb obj/hello hello.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "armv6-marcel-freebsd"...(no debugging symbols found)... Core was generated by `hello'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/GNUstep/System/Library/Libraries/libgnustep-base.so.1.24...done. Loaded symbols for /usr/local/GNUstep/System/Library/Libraries/libgnustep-base.so.1.24 Reading symbols from /usr/local/lib/libobjc.so.4.6...done. Loaded symbols for /usr/local/lib/libobjc.so.4.6 Reading symbols from /usr/local/lib/libgmp.so.10...done. Loaded symbols for /usr/local/lib/libgmp.so.10 Reading symbols from /usr/local/lib/libgnutls.so.28...done. Loaded symbols for /usr/local/lib/libgnutls.so.28 Reading symbols from /usr/local/lib/libgcrypt.so.20...done. Loaded symbols for /usr/local/lib/libgcrypt.so.20 Reading symbols from /usr/local/lib/libxslt.so.2...done. Loaded symbols for /usr/local/lib/libxslt.so.2 Reading symbols from /usr/local/lib/libxml2.so.2...done. Loaded symbols for /usr/local/lib/libxml2.so.2 Reading symbols from /lib/libz.so.6...done. Loaded symbols for /lib/libz.so.6 Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /usr/local/lib/libffi.so.6...done. Loaded symbols for /usr/local/lib/libffi.so.6 Reading symbols from /lib/libkvm.so.6...done. Loaded symbols for /lib/libkvm.so.6 Reading symbols from /usr/lib/librt.so.1...done. Loaded symbols for /usr/lib/librt.so.1 Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /usr/local/lib/libicui18n.so.53...done. Loaded symbols for /usr/local/lib/libicui18n.so.53 Reading symbols from /usr/local/lib/libicuuc.so.53...done. Loaded symbols for /usr/local/lib/libicuuc.so.53 Reading symbols from /usr/local/lib/libicudata.so.53...done. Loaded symbols for /usr/local/lib/libicudata.so.53 Reading symbols from /usr/local/lib/libdispatch.so.0...done. Loaded symbols for /usr/local/lib/libdispatch.so.0 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /lib/libgcc_s.so.1...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /lib/libcxxrt.so.1...done. Loaded symbols for /lib/libcxxrt.so.1 Reading symbols from /usr/local/lib/libp11-kit.so.0...done. Loaded symbols for /usr/local/lib/libp11-kit.so.0 Reading symbols from /usr/local/lib/libtspi.so.1...done. Loaded symbols for /usr/local/lib/libtspi.so.1 Reading symbols from /usr/local/lib/libtasn1.so.6...done. Loaded symbols for /usr/local/lib/libtasn1.so.6 Reading symbols from /usr/local/lib/libnettle.so.4...done. Loaded symbols for /usr/local/lib/libnettle.so.4 Reading symbols from /usr/local/lib/libhogweed.so.2...done. Loaded symbols for /usr/local/lib/libhogweed.so.2 Reading symbols from /usr/local/lib/libgpg-error.so.0...done. Loaded symbols for /usr/local/lib/libgpg-error.so.0 Reading symbols from /usr/lib/liblzma.so.5...done. Loaded symbols for /usr/lib/liblzma.so.5 Reading symbols from /usr/lib/libc++.so.1...done. Loaded symbols for /usr/lib/libc++.so.1 Reading symbols from /usr/lib/libBlocksRuntime.so.0...done. Loaded symbols for /usr/lib/libBlocksRuntime.so.0 Reading symbols from /lib/libcrypto.so.7...done. Loaded symbols for /lib/libcrypto.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x20645400 in objc_msgSend_fpret () from /usr/local/lib/libobjc.so.4.6 [New Thread 23003300 (LWP 100113/hello)] (gdb) (gdb) bt full #0 0x20645400 in objc_msgSend_fpret () from /usr/local/lib/libobjc.so.4.6 No symbol table info available. #1 0x202f7db4 in NSLogv (format=0x121c8, args={__ap = 0xbffff6c4}) at NSLog.m:327 pid = 0 prefix = (class NSString *) 0xf6 message = (class NSString *) 0xbffff6c4 arp = (class NSAutoreleasePool *) 0xbffff6c4 #2 0xbffff6c4 in ?? () No symbol table info available. Cannot access memory at address 0xf6
Also, -integrated-as has to be added to CFLAGS in order to build gnustep-base
Fix synopsis and assign to maintainer.
This error looks like the class of NSConstantString instances is not being set correctly in the initialiser. Can you try some other objects / methods and see if they work?
An example of compiling code containing an NSNumber... libobjc2-1.7.1 gnustep-base-1.24.6_5 source.m --------------- #include <Foundation/Foundation.h> int main (int argc, char ** argv) { NSNumber *aNum = [NSNumber numberWithInt: 2]; } compilation --------------- $ gmake This is gnustep-make 2.6.6. Type 'gmake print-gnustep-make-help' for help. Making all for tool hello... Compiling file source.m ... source.m:6:12: warning: unused variable 'aNum' [-Wunused-variable] NSNumber *aNum = [NSNumber numberWithInt: 2]; ^ 1 warning generated. /tmp/source-56bfed.s: Assembler messages: /tmp/source-56bfed.s:1765: Error: unrecognized symbol type ".objc_sel_namenumberWithInt" /tmp/source-56bfed.s:1765: Error: junk at end of line, first unrecognized character is `:' /tmp/source-56bfed.s:1767: Error: junk at end of line, first unrecognized character is `"' /tmp/source-56bfed.s:1768: Error: junk at end of line, first unrecognized character is `"' /tmp/source-56bfed.s:1770: Error: expected comma after name `' in .size directive /tmp/source-56bfed.s:1782: Error: bad expression /tmp/source-56bfed.s:1782: Error: junk at end of line, first unrecognized character is `.' clang: error: assembler command failed with exit code 1 (use -v to see invocation) /usr/local/GNUstep/System/Library/Makefiles/rules.make:468: recipe for target 'obj/hello.obj/source.m.o' failed gmake[3]: *** [obj/hello.obj/source.m.o] Error 1 /usr/local/GNUstep/System/Library/Makefiles/Instance/tool.make:74: recipe for target 'internal-tool-all_' failed gmake[2]: *** [internal-tool-all_] Error 2 /usr/local/GNUstep/System/Library/Makefiles/Master/rules.make:298: recipe for target 'hello.all.tool.variables' failed gmake[1]: *** [hello.all.tool.variables] Error 2 /usr/local/GNUstep/System/Library/Makefiles/Master/tool.make:71: recipe for target 'internal-all' failed gmake: *** [internal-all] Error 2
Comment 5 is a duplicate of comment 4 - I don't have the ability to remove it
Source ------------ #include <Foundation/Foundation.h> int main (int argc, char ** argv) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; } Result ------------ Compiles then core dumps when run... gdb ------------ $ gdb obj/hello hello.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "armv6-marcel-freebsd"...(no debugging symbols found)... Core was generated by `hello'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/GNUstep/System/Library/Libraries/libgnustep-base.so.1.24...done. Loaded symbols for /usr/local/GNUstep/System/Library/Libraries/libgnustep-base.so.1.24 Reading symbols from /usr/local/lib/libobjc.so.4.6...done. Loaded symbols for /usr/local/lib/libobjc.so.4.6 Reading symbols from /usr/local/lib/libgmp.so.10...done. Loaded symbols for /usr/local/lib/libgmp.so.10 Reading symbols from /usr/local/lib/libgnutls.so.28...done. Loaded symbols for /usr/local/lib/libgnutls.so.28 Reading symbols from /usr/local/lib/libgcrypt.so.20...done. Loaded symbols for /usr/local/lib/libgcrypt.so.20 Reading symbols from /usr/local/lib/libxslt.so.2...done. Loaded symbols for /usr/local/lib/libxslt.so.2 Reading symbols from /usr/local/lib/libxml2.so.2...done. Loaded symbols for /usr/local/lib/libxml2.so.2 Reading symbols from /lib/libz.so.6...done. Loaded symbols for /lib/libz.so.6 Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /usr/local/lib/libffi.so.6...done. Loaded symbols for /usr/local/lib/libffi.so.6 Reading symbols from /lib/libkvm.so.6...done. Loaded symbols for /lib/libkvm.so.6 Reading symbols from /usr/lib/librt.so.1...done. Loaded symbols for /usr/lib/librt.so.1 Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /usr/local/lib/libicui18n.so.53...done. Loaded symbols for /usr/local/lib/libicui18n.so.53 Reading symbols from /usr/local/lib/libicuuc.so.53...done. Loaded symbols for /usr/local/lib/libicuuc.so.53 Reading symbols from /usr/local/lib/libicudata.so.53...done. Loaded symbols for /usr/local/lib/libicudata.so.53 Reading symbols from /usr/local/lib/libdispatch.so.0...done. Loaded symbols for /usr/local/lib/libdispatch.so.0 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /lib/libgcc_s.so.1...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /lib/libcxxrt.so.1...done. Loaded symbols for /lib/libcxxrt.so.1 Reading symbols from /usr/local/lib/libp11-kit.so.0...done. Loaded symbols for /usr/local/lib/libp11-kit.so.0 Reading symbols from /usr/local/lib/libtspi.so.1...done. Loaded symbols for /usr/local/lib/libtspi.so.1 Reading symbols from /usr/local/lib/libtasn1.so.6...done. Loaded symbols for /usr/local/lib/libtasn1.so.6 Reading symbols from /usr/local/lib/libnettle.so.4...done. Loaded symbols for /usr/local/lib/libnettle.so.4 Reading symbols from /usr/local/lib/libhogweed.so.2...done. Loaded symbols for /usr/local/lib/libhogweed.so.2 Reading symbols from /usr/local/lib/libgpg-error.so.0...done. Loaded symbols for /usr/local/lib/libgpg-error.so.0 Reading symbols from /usr/lib/liblzma.so.5...done. Loaded symbols for /usr/lib/liblzma.so.5 Reading symbols from /usr/lib/libc++.so.1...done. aded symbols for /usr/lib/libc++.so.1 Reading symbols from /usr/lib/libBlocksRuntime.so.0...done. Loaded symbols for /usr/lib/libBlocksRuntime.so.0 Reading symbols from /lib/libcrypto.so.7...done. Loaded symbols for /lib/libcrypto.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x20645400 in objc_msgSend_fpret () from /usr/local/lib/libobjc.so.4.6 [New Thread 23003300 (LWP 100087/hello)] (gdb) (gdb) bt full #0 0x20645400 in objc_msgSend_fpret () from /usr/local/lib/libobjc.so.4.6 No symbol table info available. #1 0x00008a94 in main () No symbol table info available.
I cannot get the package to build any longer. I get a configure error and abort. #define SIZEOF_VOIDP 4 #define SIZEOF_SHORT 2 #define SIZEOF_INT 4 #define SIZEOF_LONG 4 #define SIZEOF_LONG_LONG 8 #define SIZEOF_FLOAT 4 #define SIZEOF_DOUBLE 8 #define CON_AUTOLOAD 1 #define HAVE_DLADDR 1 #define HAVE_GETHOSTBYNAME 1 #define HAVE_PTHREAD_H 1 #define SIZEOF_PTHREAD_MUTEX_T 4 #define SIZEOF_PTHREAD_COND_T 4 #define ALIGNOF_PTHREAD_MUTEX_T 4 #define ALIGNOF_PTHREAD_COND_T 4 #define HAVE_LIBRT 1 #define HAVE_NANOSLEEP 1 #define HAVE_USLEEP 1 #define HAVE_OBJC_ROOT_CLASS_ATTRIBUTE 1 configure: exit 1 (end of "config.log") *** Error code 1 Stop. make: stopped in /usr/ports/lang/gnustep-base [00:06:15] ====>> Warning: Leftover processes: USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND build of lang/gnustep-base ended at Mon Jan 19 18:01:02 UTC 2015 build time: 00:02:09 !!! build failure encountered !!!
Sean, are the build logs available somewhere?
(In reply to David Chisnall from comment #9) It looks like gnustep-base is building now. :-) http://chips.ysv.freebsd.org/data/11armv6-default/2015-09-11_21h01m04s/logs/gnustep-base-1.24.8.log
whoops, should have seen that this was a runtime and not a compiletime issue.
I think that the segfault issue is the same as observed in PR202224. *** This bug has been marked as a duplicate of bug 202224 ***