gnustep-dev
[Top][All Lists]
Advanced

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

Re: FreeBSD - no luck with libobjc2


From: Riccardo Mottola
Subject: Re: FreeBSD - no luck with libobjc2
Date: Mon, 13 Apr 2020 19:17:39 +0200
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 SeaMonkey/2.53.1

Hi Wolfgang,

glad to see you around.

Wolfgang Lux wrote:


Am 13.04.2020 um 13:56 schrieb Riccardo Mottola <address@hidden>:

So now? Is this not the correct way to change cmake parameters?

I've never used ccmake, but I'm using cmake directly in the way suggested in 
the INSTALL file:
   cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ 
-DCMAKE_BUILD_TYPE=RelWithDebInfo ..
and then I don't try to touch the cmake configuration in any way.
Presumably you can even omit the -DCMAKE_C_COMPILER and -DCMAKE_CXX_COMPILER 
options on FreeBSD because there should be no gcc (unless you've installed it 
yourself or it got installed by some package you are using). But then both 
shouldn't hurt either. The -DCMAKE_BUILD_TYPE option is only for getting 
debugging symbols for libobjc2 (and to prevent Class from being an abstract 
type, which makes debugging even more of a pain than it is already due to gdb 
and lldb not being aware of the instance variables offsets).
That said, I would recommend nuking your old build directory and starting from 
scratch before calling cmake because it seems to update the existing 
configuration. So if that is already broken in some way, you'll still end up 
with a configuration that's most likely broken again.

I started that way, then I thought of trying different linkers and the best place to do that is I think "ccmake .". Or perhaps I am wrong.

I uninstalled gcc, since it doesn't work to build GNUstep anyway on FreeBSD (this is why libobjc2 is critical for me here, or I'd just gcc and avoid the hassle)




I think this is quite a mess.

Well, cmake is a mess (unless you'r used to it, of course); my first complaint 
is the lack of an equivalent for ./config.status -V, which would just show the 
configuration parameters that were provided to cmake in this particular build 
directory.

well, I think ccmake . should show you the last "status" and how it was initialized...


I started from a total clean Build directory:

cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo

only command I gave.

-- The C compiler identification is Clang 8.0.0
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/cc
-- The CXX compiler identification is Clang 8.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Testing C++ interop
-- Testing /usr/lib/libcxxrt.so as the C++ runtime library
-- Using /usr/lib/libcxxrt.so as the C++ runtime library
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- GNUstep install type set to SYSTEM
-- Performing Test CXA_ALLOCATE_EXCEPTION_NOEXCEPT_COMPILES
-- Performing Test CXA_ALLOCATE_EXCEPTION_NOEXCEPT_COMPILES - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/multix/code/gnustep-cvs/libobjc2/Build

Builf fails:

I get just one error now.... (which was included in the big list we had before)

[ 11%] Linking C executable ObjCXXEHInterop_arc_optimised
../libobjc.so.4.6: undefined reference to `ceilf'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- Test/ObjCXXEHInterop_arc_legacy_optimised ---
*** [Test/ObjCXXEHInterop_arc_legacy_optimised] Error code 1

to test "gold" I thus nuked the Build Directory again: and did:
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_LINKER=/usr/local/bin/ld.gold

Gold fails the same way:
[ 11%] Linking C executable ObjCXXEHInterop_arc_legacy_optimised
../libobjc.so.4.6: undefined reference to `ceilf'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- Test/ObjCXXEHInterop_arc_optimised ---
*** [Test/ObjCXXEHInterop_arc_optimised] Error code 1

make[2]: stopped in /usr/home/multix/code/gnustep-cvs/libobjc2/Build

So indeed, it was not coming out before.

Now I tried an additional trick: use "ccmake ." again:
 CMAKE_EXE_LINKER_FLAGS           -lm

that seems to have fixed it! I am running GNUstep again on my workstation.

Now I will test on the laptops... and try first to use the system linker and not gold, just to see.

Riccardo



reply via email to

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