Re: libobjc2 build issues (missing files)

2020-03-05 Thread Wolfgang Lux



> Am 05.03.2020 um 11:21 schrieb Andreas Fink :
> 
> CMakeFiles/objc.dir/libstdcxx_current_primary_exception.cc.o
> /Users/afink/development/gnustep/libobjc2/arc.mm:6:10: fatal error: 
> 'third_party/robin-map/include/tsl/robin_map.h' file not found
> #include "third_party/robin-map/include/tsl/robin_map.h"
> ^~~
> 1 error generated.
> make[2]: *** [CMakeFiles/objc.dir/build.make:411: 
> CMakeFiles/objc.dir/arc.mm.o] Error 1
> make[2]: *** Waiting for unfinished jobs
> [ 16%] Linking CXX static library libobjc.a
> make[1]: *** [CMakeFiles/Makefile2:484: CMakeFiles/objc.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs
> [ 16%] Built target objc-static
> make: *** [Makefile:163: all] Error 2
> 
> 
> Can anyone hint where this file should come from?

Those files are coming from a submodule. IIRC, you need to execute
  git submodule init
once in your clone.

Wolfgang




Re: libobjc2 build issues (missing files)

2020-03-05 Thread Andreas Fink
actually 

git submodule init
git submodule update

did the trick.

now libobjc2 is installed but when compiling gnustep-base, all looks fine but 
make check returns all tests fail with a segfault...

Its probably something easy to fix but im not sure whats the easiest way to run 
such a test by hand with lldb



> On 5 Mar 2020, at 12:04, Wolfgang Lux  wrote:
> 
> 
> 
>> Am 05.03.2020 um 11:21 schrieb Andreas Fink :
>> 
>> CMakeFiles/objc.dir/libstdcxx_current_primary_exception.cc.o
>> /Users/afink/development/gnustep/libobjc2/arc.mm:6:10: fatal error: 
>> 'third_party/robin-map/include/tsl/robin_map.h' file not found
>> #include "third_party/robin-map/include/tsl/robin_map.h"
>>^~~
>> 1 error generated.
>> make[2]: *** [CMakeFiles/objc.dir/build.make:411: 
>> CMakeFiles/objc.dir/arc.mm.o] Error 1
>> make[2]: *** Waiting for unfinished jobs
>> [ 16%] Linking CXX static library libobjc.a
>> make[1]: *** [CMakeFiles/Makefile2:484: CMakeFiles/objc.dir/all] Error 2
>> make[1]: *** Waiting for unfinished jobs
>> [ 16%] Built target objc-static
>> make: *** [Makefile:163: all] Error 2
>> 
>> 
>> Can anyone hint where this file should come from?
> 
> Those files are coming from a submodule. IIRC, you need to execute
>  git submodule init
> once in your clone.
> 
> Wolfgang
> 





Re: libobjc2 build issues (missing files)

2020-03-05 Thread Andreas Fink
ok the segfaults was just the wrong linker again.

export LDFLAGS="-fuse-ld=/usr/bin/ld.gold"

was missing.


Now everything compiles, the gnustep tests all pass (except some minor issues 
with date formats)
However if I build my applications, I get undefined references to   
cxa_guard_release. This is some C++ stufff. I dont use C++ or ObjC++ in my code 
anywhere. Never the less there are some linking against it from 3 libraries I 
have. These all have something in comon
Apparently libobjc2  has a reference to cxa_guard_release but I'm not sure why 
its not properly linked against if it needs it.

I'm compiling with clang-11 from the llvm repo and this uses libc++ not 
libstdc++ now I believe.
So probably a few cflags to be added. Any hint anyone?


> On 5 Mar 2020, at 12:04, Wolfgang Lux  wrote:
> 
> 
> 
>> Am 05.03.2020 um 11:21 schrieb Andreas Fink :
>> 
>> CMakeFiles/objc.dir/libstdcxx_current_primary_exception.cc.o
>> /Users/afink/development/gnustep/libobjc2/arc.mm:6:10: fatal error: 
>> 'third_party/robin-map/include/tsl/robin_map.h' file not found
>> #include "third_party/robin-map/include/tsl/robin_map.h"
>>^~~
>> 1 error generated.
>> make[2]: *** [CMakeFiles/objc.dir/build.make:411: 
>> CMakeFiles/objc.dir/arc.mm.o] Error 1
>> make[2]: *** Waiting for unfinished jobs
>> [ 16%] Linking CXX static library libobjc.a
>> make[1]: *** [CMakeFiles/Makefile2:484: CMakeFiles/objc.dir/all] Error 2
>> make[1]: *** Waiting for unfinished jobs
>> [ 16%] Built target objc-static
>> make: *** [Makefile:163: all] Error 2
>> 
>> 
>> Can anyone hint where this file should come from?
> 
> Those files are coming from a submodule. IIRC, you need to execute
>  git submodule init
> once in your clone.
> 
> Wolfgang
> 





Re: libobjc2 build issues (missing files)

2020-03-05 Thread niels . grewe
(Re-adding the list since I foobared the last mail)

You could try forcing libobjc2 to be linked against libc++, if you’re not 
reliant on EH interop with C++ (I don’t have the cmake flag for that present, 
I‘m afraid). But you’re probably better off using libstdc++ for the time being. 

N

--
Sent on the road

> Am 05.03.2020 um 13:50 schrieb Andreas Fink :
> 
> so what would be the work around to get this working?
> Im trying to get this done in Debian 10 (Buster). Interestingly only my app 
> seems to complain when I compile. And it seems to have something to do with 
> statics.
> Under Debian 9 everything works. I dont use any C++ code myself (but some 
> external libraries which only use standard C++, not ObjC++).
> 
> 
>> On 5 Mar 2020, at 13:44, niels.gr...@halbordnung.de wrote:
>> 
>> Hi Andreas,
>> 
>> libobjc2 is not compatible with libc++ atm, in particular EH interop is 
>> broken and the robin-map implementation is non-header-only with libc++, 
>> which is why you are seeing missing symbols. I am semi-actively working on 
>> that (#142 in libobjc2)
>> 
>> Cheers,
>> 
>> Niels
>> --
>> Sent on the road
>> 
 Am 05.03.2020 um 12:55 schrieb Andreas Fink :
>>> 
>>> ok the segfaults was just the wrong linker again.
>>> 
>>> export LDFLAGS="-fuse-ld=/usr/bin/ld.gold"
>>> 
>>> was missing.
>>> 
>>> 
>>> Now everything compiles, the gnustep tests all pass (except some minor 
>>> issues with date formats)
>>> However if I build my applications, I get undefined references to   
>>> cxa_guard_release. This is some C++ stufff. I dont use C++ or ObjC++ in my 
>>> code anywhere. Never the less there are some linking against it from 3 
>>> libraries I have. These all have something in comon
>>> Apparently libobjc2  has a reference to cxa_guard_release but I'm not sure 
>>> why its not properly linked against if it needs it.
>>> 
>>> I'm compiling with clang-11 from the llvm repo and this uses libc++ not 
>>> libstdc++ now I believe.
>>> So probably a few cflags to be added. Any hint anyone?
>>> 
>>> 
> On 5 Mar 2020, at 12:04, Wolfgang Lux  wrote:
>>> Am 05.03.2020 um 11:21 schrieb Andreas Fink :
>> CMakeFiles/objc.dir/libstdcxx_current_primary_exception.cc.o
>> /Users/afink/development/gnustep/libobjc2/arc.mm:6:10: fatal error: 
>> 'third_party/robin-map/include/tsl/robin_map.h' file not found
>> #include "third_party/robin-map/include/tsl/robin_map.h"
>>^~~
>> 1 error generated.
>> make[2]: *** [CMakeFiles/objc.dir/build.make:411: 
>> CMakeFiles/objc.dir/arc.mm.o] Error 1
>> make[2]: *** Waiting for unfinished jobs
>> [ 16%] Linking CXX static library libobjc.a
>> make[1]: *** [CMakeFiles/Makefile2:484: CMakeFiles/objc.dir/all] Error 2
>> make[1]: *** Waiting for unfinished jobs
>> [ 16%] Built target objc-static
>> make: *** [Makefile:163: all] Error 2
>> Can anyone hint where this file should come from?
 Those files are coming from a submodule. IIRC, you need to execute
 git submodule init
 once in your clone.
 Wolfgang
> 
> 


Re: libobjc2 build issues (missing files)

2020-03-05 Thread Patryk Laurent
Hi Andreas, 

> On Mar 5, 2020, at 03:55, Andreas Fink  wrote:
> 
> ok the segfaults was just the wrong linker again.
>export LDFLAGS="-fuse-ld=/usr/bin/ld.gold"
> was missing.
> 
>>> CMakeFiles/objc.dir/libstdcxx_current_primary_exception.cc.o
>>> /Users/afink/development/gnustep/libobjc2/arc.mm:6:10: fatal error: 
>>> 'third_party/robin-map/include/tsl/robin_map.h' file not found
>>> #include "third_party/robin-map/include/tsl/robin_map.h"
>>>   ^~~
>> git submodule init
>> once in your clone.

For your reference, Johannes has collected knowledge like the above (submodes, 
LD, etc) into a script that builds for Debian 10 with Clang 8.

https://github.com/plaurent/gnustep-build/tree/master/debian-10-clang-8.0

Patryk



Re: libobjc2 build issues (missing files)

2020-03-05 Thread Andreas Fink



> On 5 Mar 2020, at 14:36, niels.gr...@halbordnung.de wrote:
> 
> (Re-adding the list since I foobared the last mail)
> 
> You could try forcing libobjc2 to be linked against libc++, if you’re not 
> reliant on EH interop with C++ (I don’t have the cmake flag for that present, 
> I‘m afraid). But you’re probably better off using libstdc++ for the time 
> being. 
> 
> N


adding -stdlib=libstdc++ to CFLAGS did the trick.
clang always complains about unused compiler options (probably when compiling c 
instead of c++) are filling the screen but at the end the binary works






Re: libobjc2 build issues (missing files)

2020-03-10 Thread Riccardo Mottola
Hi,
Andreas Fink wrote:
> ok the segfaults was just the wrong linker again.
>
>   export LDFLAGS="-fuse-ld=/usr/bin/ld.gold"
>
> was missing.

when do you set this? before running cmake? or make? of libobjc?
Or do you set it globally before configuring gnustep make.

Riccardo