discuss-gnustep
[Top][All Lists]
Advanced

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

Re: libobjc2/gnustep-base also failing under FreeBSD


From: David Chisnall
Subject: Re: libobjc2/gnustep-base also failing under FreeBSD
Date: Mon, 11 Feb 2019 14:58:05 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0

On 11/02/2019 11:10, Andreas Fink wrote:
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

This is how I did it:

# pkg ins gnustep


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


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

These look a bit like sensible dependencies. You can also just do 'pkg ins gnustep-base ; pkg del gnustep-base' to get all of the dependencies for gnustep-base.


bash




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

     mkdir gnustep
     cd gnustep
    wget 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 # <-- 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 ..


Not sure why you're manually compiling iconv. On FreeBSD, this should be part of the base system, so some random third-party version may or may not work.



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

export CC="clang-devel"
export CXX="clang++-devel"

I have no idea when the llvm-devel port was last updated, so I'm not sure what this corresponds to. The GNUstep packages are all built using the llvm70 package, so I'd recommend you install that and use clang70 / clang++70.

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"

I don't know if setting LDFLAGS as an environment variable does anything.



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

This all looks plausible. I haven't tried building with make for a long time, but I believe it works.

     cd ..
     ldconfig

As I understand it, running ldconfig with no arguments does nothing.




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 ..

These look vaguely plausible. I don't use FHS layout, but I don't believe it should break anything. I don't know what --enable-objc-arc is meant to do with gnustep-make - it doesn't make sense to have it as a global configuration thing, everything else looks similar to what the port build does:

https://svnweb.freebsd.org/ports/head/devel/gnustep-make/Makefile?limit_changes=0&view=markup


the output is this:

The output from what? This looks as if it's a build of -base, but you don't say how you configured -base. This is how the port does it:

https://svnweb.freebsd.org/ports/head/lang/gnustep-base/Makefile?limit_changes=0&view=markup


ld.lld: error: obj/libgnustep-base.obj/NSRegularExpression.m.o: symbol address@hidden@8Q16^C24l has undefined version address@hidden

I guess that answers the question about how old the llvm-devel port is. The answer to this is the same as the answer a couple of months ago when you asked the same question. This is a bug that was introduced in clang after the 7 release and was fixed by the time 8 went to beta. You've picked up an unreleased version from the window when it was broken.

I believe clang 7 is well tested. I believe 8 should work, but I've not tested it as much. I have no idea how well any given svn release will work.

David



reply via email to

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