Hello David,

Given you develop mainly on Freebsd, I tried to see if I can get a stable 
instance of libobjc2 and gnustep-base by switching to FreeBSD.

but I still run into linker issues. This is how I did it


1. freshly installed VM with FeeBSD 12.0
------------------------------------------

Installed from Disk image:

https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.0/FreeBSD-12.0-RELEASE-amd64-dvd1.iso
 
<https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.0/FreeBSD-12.0-RELEASE-amd64-dvd1.iso>


2. Add Depenencies and switch to bash shell
-------------------------------------------

pkg install git \
        autoconf \
        automake \
        cmake \
        subversion  \
        clang-devel-8.d20181024 \
        wget \
        bash \
        pkgconf \
        sudo \
        gmake \
        windowmaker \
        jpeg \
        tiff \
        png \
        libxml2 \
        libxslt \
        gnutls \
        libffi \
        icu \
        cairo \
        avahi \
        portaudio \
        flite \
        pngwriter

bash




3. Download the sourcecode of gnustep
---------------------------------------------------

    mkdir gnustep
    cd gnustep
    wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz 
<http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz>   # FreeBSD only 
comes with libiconv-1.14 which has a bug we run into earlier
    # git clone https://github.com/apple/swift-corelibs-libdispatch 
<https://github.com/apple/swift-corelibs-libdispatch> # <-- this doesnt compile 
under FreeBSD yet. TODO for later.
    git clone https://github.com/gnustep/scripts
    git clone https://github.com/gnustep/make
    git clone https://github.com/gnustep/libobjc2 
    git clone https://github.com/gnustep/base
    git clone https://github.com/gnustep/corebase
    git clone https://github.com/gnustep/gui
    git clone https://github.com/gnustep/back
    # ./scripts/install-dependencies  <- this doesn't work for freeBSD but the 
dependencies above fix that which is based on the openbsd version
        
        
    tar -xvzf libiconv-1.15.tar.gz
    cd libiconv-1.15
    ./configure --enable-static --enable-dynamic
    make
    make install
    cd ..


4. Setting some defaults
------------------------------------------------

export CC="clang-devel"
export CXX="clang++-devel"
export 
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
export LDFLAGS="-fuse-ld=lld-devel"


5. install libobjc2 runtime

    cd libobjc2
    mkdir Build
    cd Build
    cmake ..  -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIBOBJC=1  
-DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX}
    make -j8
    make install
    cd ..
    ldconfig



6. install gnustep-make

    ./configure \
            --with-layout=fhs \
            --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=/etc/GNUstep/GNUstep.conf \
            --with-user-config-file='.GNUstep.conf' \
            --with-user-defaults-dir='GNUstep/Library/Defaults' \
    gmake
    gmake install
    source /etc/GNUstep/GNUstep.conf
    cd ..
 


the output is this:


...
 compiling file NSUUID.m ...
 Compiling file NSValue.m ...
 Compiling file NSValueTransformer.m ...
 Compiling file NSXMLDocument.m ...
 Compiling file NSXMLDTD.m ...
 Compiling file NSXMLDTDNode.m ...
 Compiling file NSXMLElement.m ...
 Compiling file NSXMLNode.m ...
 Compiling file NSXMLParser.m ...
 Compiling file NSZone.m ...
 Compiling file externs.m ...
 Compiling file objc-load.m ...
 Compiling file GSFileHandle.m ...
 Compiling file NSMessagePort.m ...
 Compiling file NSMessagePortNameServer.m ...
 Compiling file NSNetServices.m ...
 Compiling file GSAvahiNetService.m ...
 Compiling file GSAvahiNetServiceBrowser.m ...
 Compiling file GSAvahiClient.m ...
 Compiling file GSAvahiRunLoopIntegration.m ...
 Compiling file GSFFIInvocation.m ...
 Linking library libgnustep-base ...
ld.lld: error: obj/libgnustep-base.obj/NSRegularExpression.m.o: symbol 
__block_descriptor_40_e8_32o_e15_v32@?0@8Q16^C24l has undefined version 
?0@8Q16^C24l
ld.lld: error: obj/libgnustep-base.obj/NSRegularExpression.m.o: symbol 
__block_descriptor_40_e8_32r_e15_v32@?0@8Q16^C24l has undefined version 
?0@8Q16^C24l
clang-8: error: linker command failed with exit code 1 (use -v to see 
invocation)
gmake[4]: *** [/usr/local/share/GNUstep/Makefiles/Instance/library.make:293: 
obj/libgnustep-base.so.1.26.0] Error 1
gmake[3]: *** [/usr/local/share/GNUstep/Makefiles/Instance/library.make:278: 
internal-library-all_] Error 2
gmake[2]: *** [/usr/local/share/GNUstep/Makefiles/Master/rules.make:297: 
libgnustep-base.all.library.variables] Error 2
gmake[1]: *** [/usr/local/share/GNUstep/Makefiles/Master/library.make:37: 
internal-all] Error 2
gmake: *** 
[/usr/local/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: 
internal-all] Error 2



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to