[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libobjc2 / gnustep-base build troubles on Debian9

From: Andreas Fink
Subject: libobjc2 / gnustep-base build troubles on Debian9
Date: Wed, 30 Jan 2019 10:15:12 +0100

Hello David & all

Today I tried to build libobjc2 exactly the way you did as you seemed to have no errors.
So I installed Debian Testing (sid) on to an empty VM and got clang-7.0.1 with it.

I built then libobjc2 and all tests passed.

Then I went  onto gnustep-make and gnustep-base
Now gnustep-base doesn't want to configure..

It breaks with

The objc runtime library does not appear to have synchronisation support.  Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option.

This came from the following code test:

configure:8000: checking for objc_sync_enter
configure:8000: /usr/bin/clang-7 -o conftest -I /opt/universalss7/include -L /opt/universalss7/lib/ -I/opt/universalss7/include -I/opt/universalss7/include -I/opt/universalss7/include -l/opt/universalss7/include -fblocks -x objective-c -L /opt/universalss7/lib/ -L/opt/universalss7/lib -L/opt/universalss7/lib -L/opt/universalss7/lib -L/opt/universalss7/lib conftest.c -lrt -ldl -lpthread -rdynamic -L /opt/universalss7/lib/ -pthread -fexceptions -fobjc-runtime=gnustep-2.0 -fblocks -L/root/GNUstep/Library/Libraries -L/opt/universalss7/lib -lpthread -l:libobjc.so.4.6 -lm   -lpthread  >&5

conftest.c:130:6: warning: incompatible redeclaration of library function 'objc_sync_enter' [-Wincompatible-library-redeclaration]
char objc_sync_enter ();
conftest.c:130:6: note: 'objc_sync_enter' is a builtin with type 'int (id)'
1 warning generated.
/usr/bin/ld: /tmp/conftest-ca1f4b.o:(.data..objc_init[.objc_init]+0x18): undefined reference to `__start___objc_classes'
/usr/bin/ld: /tmp/conftest-ca1f4b.o:(.data..objc_init[.objc_init]+0x20): undefined reference to `__stop___objc_classes'
/usr/bin/ld: conftest: hidden symbol `__start___objc_classes' isn't defined
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)

As you can see
the libobjc2 is here:

-rw-r--r-- 1 root root 1151786 Jan 30 08:54 /opt/universalss7/lib/libobjc.a
lrwxrwxrwx 1 root root      14 Jan 30 08:55 /opt/universalss7/lib/libobjc.so -> libobjc.so.4.6
-rw-r--r-- 1 root root  683024 Jan 30 08:54 /opt/universalss7/lib/libobjc.so.4.6

gnustep-make was configured that way:

    cd make
    export PREFIX=/opt/universalss7/
    export CC=clang-7
    export CXX=clang++-7

    cat FilesystemLayouts/fhs | sed 's/^GNUSTEP_DEFAULT_PREFIX=.*$/GNUSTEP_DEFAULT_PREFIX=\/opt\/universalss7/g' > FilesystemLayouts/universalss7
    export RUNTIME_VERSION=gnustep-2.0
    export OBJCFLAGS="-fblocks"
    export LDLAGS="-L${PREFIX}/lib"
    ./configure \
     --includedir=${PREFIX}/include \
     --libdir==${PREFIX}/lib \
            --with-layout=universalss7 \
            --disable-importing-config-file \
            --enable-native-objc-exceptions \
            --enable-objc-arc \
            --enable-install-ld-so-conf \
            --with-library-combo=ng-gnu-gnu \
            --with-config-file=${PREFIX}/etc/GNUstep/GNUstep.conf \
            --with-user-config-file='.GNUstep.conf' \
            --with-user-defaults-dir='GNUstep/Library/Defaults' \

I noticed there is another libobjc runtime on the system which came with clang-7 which is at /usr/lib/x86_64-linux-gnu/libobjc.so.4
but given we have put -l:libobjc.so.4.6 , this should not be an issue. (note the /opt/universalss7/lib directory is in /etc/ld.so.conf.d/gnustep-make.conf)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]