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: Andreas Fink
Subject: Re: libobjc2/gnustep-base also failing under FreeBSD
Date: Mon, 11 Feb 2019 16:03:50 +0100



> On 11 Feb 2019, at 15:58, David Chisnall <gnustep@theravensnest.org> wrote:
> 
> 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
> 


That gives old stuff:

root@freebsd:/usr/Users/afink/gnustep/base # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
root@freebsd:/usr/Users/afink/gnustep/base # pkg search libobjc
libobjc2-1.8.1_2               Replacement Objective-C runtime supporting 
modern Objective-C features
root@freebsd:/usr/Users/afink/gnustep/base # pkg search lgnustep
root@freebsd:/usr/Users/afink/gnustep/base # pkg search gnustep
gnustep-1.28.0_5               Objective-C libraries based on the OpenStep 
standard
gnustep-back-0.25.1_2          GNUstep GUI backend
gnustep-base-1.25.0_7          GNUstep Foundation library
gnustep-cdplayer-0.5.1_7       GNUstep CD player with CDDB support
gnustep-examples-1.4.0_7       GNUstep example applications
gnustep-ftp-0.5_5              Compact and handy FTP client for GNUstep
gnustep-gui-0.25.1_7           GNUstep GUI library
gnustep-ladder-1.0_8           GNU Go frontend for GNUstep
gnustep-make-2.7.0_2           GNUstep makefile package
gnustep-preview-0.8.5_9        Simple image viewer
gnustep-sudoku-0.7_6           Sudoku solver and generator
gnustep-wrapper-0.1.0_8        Create GNUstep app-wrappers of non-GNUstep 
applications
root@freebsd:/usr/Users/afink/gnustep/base #


> 
>> 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 
>> __block_descriptor_40_e8_32o_e15_v32@?0@8Q16^C24l has undefined version 
>> ?0@8Q16^C24l
> 
> 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]