> On 5 Jun 2018, at 18:40, Andreas Höschler <ahoe...@smartsoft.de> wrote:
>
> Hi Ivan,
>
>> This is on a Mac, judging on the hostname and /Users/ being parent of the
>> homedir.
>
> Yes! However, I use GNUstep make to build all my stuff even on MacOSX, so no
> xCode anywhere.
>
>> Therefore I will guess that GNUstep is built as a universal binary and the
>> test program is being built as a universal ("fat") binary.
>
> I haven't built GNUstep on MacOSX but am using Cocoa (Foundation, AppKit). I
> just use GNUstep make to build my stuff.
>
>> At the very least, force the test program to not be built as a universal
>> binary.
>
> How do I do that with GNUstep make? What do I need to change in my
> GNUmakefile?
Your problem was also present when invoking gcc manually. I expected you’d
first try that.
You compiled and linked as follows:
admins-iMac:FirstAccess ahoesch$ gcc main.m -c -MMD -MP
-DNeXT_Foundation_LIBRARY=1 -DNeXT_GUI_LIBRARY=1 -DNeXT_RUNTIME=1 -dynamic
-fno-common -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fno-strict-aliasing
-fnext-runtime -Wno-parentheses -Wno-import -I. -I/usr/local/include/
-F/Library/Frameworks/ -o /Build/FirstAccess/obj/FirstAccess.obj/main.m.o
admins-iMac:FirstAccess ahoesch$ gcc -fnext-runtime -o
/Build/FirstAccess/obj/FirstAccess
/Build/FirstAccess/obj/FirstAccess.obj/main.m.o -ldl -lpthread -lz -lm
-L/usr/local/lib/ -F/Library/Frameworks/ -framework Foundation -lm
You could add -m32 or -m64 here as well. Or, Mac-style, -arch i386 or -arch
x86_64. This depends on what your SQLite was built with.
>
> <GNUmakefile>
To complement Wolfgang’s suggestion, set the following:
- FirstAccess_CFLAGS
- FirstAccess_OBJCFLAGS
- FirstAccess_LDFLAGS
See more:
http://gnustep-docs.sourceforge.net/makefile-manual/Standard-Project-Variables.html
>
>
>> Better is to build sqlite3 as universal.
>
> Well, I used the recommended
>
> tar xvf sqlite-autoconf-3230100.tar
> cd sqlite-autoconf-3230100
> ./configure
> make
> make install
>
> to build it and have no idea what to do else to build it universal!? :-(
If I recall correctly (I probably last did this stuff ~2011, or 2013 at the
latest), pass both "-arch i386” and "-arch x86_64” flags to both compiler and
linker (i.e. add them to CFLAGS, CXXFLAGS, LDFLAGS when invoking configure).
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep