Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

GNUstep - General mailing list
Hi David,
Hi All,

I tried to make GNUstep from git according to the wiki :
http://wiki.gnustep.org/index.php/Building_GNUstep_under_Debian_FreeBSD

I am stuck at this step : building libobjc2.

These are the steps and things done :

Building GNUstep under Raspbian (Buster 10.4) :

Step 1) Dependencies under Debian 10 : all done

Step 2) We install a decent clang compiler : done with clang 9, and lldb-9, lld-9
pi@raspberrypi:~/Fabrique/gnustep $ clang-9 --version
clang version 9.0.1-6+rpi1~bpo10+1
Target: armv6k-unknown-linux-gnueabihf
Thread model: posix
InstalledDir: /usr/bin

Step 3) Download GNUSTEP (from git) : all done

Step 4) libiconv : passed.

Step 5) Defaults : updated due to clang-9
export CC=/usr/bin/clang-9
export CXX=/usr/bin/clang++-9
...

Step 6) libdispatch : failed / passed
pi@raspberrypi:~/Fabrique/gnustep/swift-corelibs-libdispatch/build $ cmake .. -DCMAKE_C_COMPILER=${CC} \
>             -DCMAKE_CXX_COMPILER=${CXX} \
>             -DCMAKE_BUILD_TYPE=Release \
>             -DUSE_GOLD_LINKER=YES
CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
  CMake 3.15.1 or higher is required.  You are running version 3.13.4

Step 7) libobjc2 / gnustep-base :
Step 7-a) Blocked at building libobjc2 due to an ASM configure error :

pi@raspberrypi:~/Fabrique/gnustep/libobjc2/build $ cmake .. -DCMAKE_BUILD_TYPE=Release \

>             -DBUILD_STATIC_LIBOBJC=1  \
>             -DCMAKE_C_COMPILER=${CC} \
>             -DCMAKE_CXX_COMPILER=${CXX} \
>             -DCMAKE_LINKER=${LD} \
>             -DCMAKE_MODULE_LINKER_FLAGS=${LDFLAGS}
>-- The ASM compiler identification is unknown
>-- Found assembler: /usr/local/clang_9.0.0/bin/clang-9
>CMake Error at CMakeLists.txt:3 (project):
>  The CMAKE_ASM_COMPILER:
>
>    /usr/local/clang_9.0.0/bin/clang-9
>
>  is not a full path to an existing compiler tool.
>
>  Tell CMake where to find the compiler by setting either the environment
>  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
>  to the compiler, or to the compiler name if it is in the PATH.
>
>
>-- Warning: Did not find file Compiler/-ASM
>-- Configuring incomplete, errors occurred!
>See also "/home/pi/Fabrique/gnustep/libobjc2/build/CMakeFiles/CMakeOutput.log".
>See also "/home/pi/Fabrique/gnustep/libobjc2/build/CMakeFiles/CMakeError.log".

Well, your help will be much appreciated.

Regards,

--
Patrick CARDONA

Reply | Threaded
Open this post in threaded view
|

Re: Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

Johannes Brakensiek
Hi Patrick,

On 14 Jun 2020, at 23:15, Patrick Cardona via Discussion list for the
GNUstep programming environment wrote:

> I tried to make GNUstep from git according to the wiki :
> http://wiki.gnustep.org/index.php/Building_GNUstep_under_Debian_FreeBSD
>
> I am stuck at this step : building libobjc2.
>
> These are the steps and things done :
>
> Building GNUstep under Raspbian (Buster 10.4) :
>
> Target: armv6k-unknown-linux-gnueabihf

I don’t know the exact cause of your failure, so David might want to
add valuable information here.

But afaik some parts of libobjc2 2.0 are built from assembler code. The
needed code for the armhf architecture does not exist yet. That
architecture is 32bit. If you try the 64bit variant (aarch64) it should
work afaik.

If you want to build libobjc2 on armhf you will have to use the older
version 1.9 of libobjc (which does not require clang >= 8, but works
with older versions of clang as well).

We have a script prepared for this which should install GNUstep by just
running it:
https://github.com/plaurent/gnustep-build/blob/master/raspbian-10-clang-7.0-runtime-1.9-ARM/GNUstep-buildon-raspbian10.sh

If you are going to use aarch64 this one should work as well:
https://github.com/plaurent/gnustep-build/blob/master/debian-10-clang-8.0/GNUstep-20-buildon-debian10.sh

I’d be glad if David could approve this is correct.

Also, it would be very nice if anybody would like to do the missing
libobjc2 assembler implementation for armhf. I think this is a common
use case as long as the default arch for Raspbian is 32 bit. Even though
this arch will be running out of support at some time in the future, of
course.

For anybody building libobjc2 on a Debian based platform: Please note
there are also some very recent Debian source packages. I have not yet
tried to build them, but I think that approach sounds very promising:
https://github.com/trunkmaster/nextspace/tree/master/Packaging/Debian 
(this will only work if you try it on the supported platforms of
course).

Cheers
Johannes

Reply | Threaded
Open this post in threaded view
|

Re: Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

GNUstep - General mailing list
I forgot to make the list with copy. Here it is...

Le 15/06/20 à 17:17, Patrick Cardona a écrit :

> Hi Johannes,
>
> Le 15/06/20 à 09:13, Johannes Brakensiek a écrit :
> > Hi Patrick,
> >
> > On 14 Jun 2020, at 23:15, Patrick Cardona via Discussion list for the
> > GNUstep programming environment wrote:
> >
> > > I tried to make GNUstep from git according to the wiki :
> > > http://wiki.gnustep.org/index.php/Building_GNUstep_under_Debian_FreeBSD
> > >
> > > I am stuck at this step : building libobjc2.
> > >
> > > These are the steps and things done :
> > >
> > > Building GNUstep under Raspbian (Buster 10.4) :
> > >
> > > Target: armv6k-unknown-linux-gnueabihf
> >
> > I don’t know the exact cause of your failure, so David might want to add
> > valuable information here.
> >
> > But afaik some parts of libobjc2 2.0 are built from assembler code. The
> > needed code for the armhf architecture does not exist yet. That architecture
> > is 32bit. If you try the 64bit variant (aarch64) it should work afaik.
> >
> > If you want to build libobjc2 on armhf you will have to use the older
> > version 1.9 of libobjc (which does not require clang >= 8, but works with
> > older versions of clang as well).
> >
> > We have a script prepared for this which should install GNUstep by just
> > running it: https://github.com/plaurent/gnustep-build/blob/master/raspbian-10-clang-7.0-runtime-1.9-ARM/GNUstep-buildon-raspbian10.sh
> Great ! Hi will make my system clean and try it.
>
> >
> > If you are going to use aarch64 this one should work as well: https://github.com/plaurent/gnustep-build/blob/master/debian-10-clang-8.0/GNUstep-20-buildon-debian10.sh
> >
> My RPI B3+ is arm V7 : only 32bit.
> But I will remember that other script when I shall move to the new RPI 4.
>
> > I’d be glad if David could approve this is correct.
> >
> > Also, it would be very nice if anybody would like to do the missing libobjc2
> > assembler implementation for armhf. I think this is a common use case as
> > long as the default arch for Raspbian is 32 bit. Even though this arch will
> > be running out of support at some time in the future, of course.
> >
> > For anybody building libobjc2 on a Debian based platform: Please note there
> > are also some very recent Debian source packages. I have not yet tried to
> > build them, but I think that approach sounds very promising:
> > https://github.com/trunkmaster/nextspace/tree/master/Packaging/Debian (this
> > will only work if you try it on the supported platforms of course).
> >
> > Cheers
> > Johannes
> >
>
> Thank You for your help.
> I will com back soon with GNUMail I hope ;-)
>
> Regards,
>
> --
> Bien cordialement,
> Patrick CARDONA

--
Bien cordialement,
Patrick CARDONA

Reply | Threaded
Open this post in threaded view
|

Re: Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

GNUstep - General mailing list
In reply to this post by Johannes Brakensiek
Hi Johannes,
Hi All,

I first made a backup of ~/GNUstep so I started with a fresh new one to avoid conflicts with the previous install...
Behalf the script by Patryck Laurent (great job !), pointed out by Johannes, I was able to build gnustep from github repo
with clang-7 on my raspbian 10 (Buster). Every thing was well made. So the GNustep runtime is now 1.9.
I build also some apps from gap, GNUMail and so on... I am writing this message within GNUMail. ;-)
I installed every new build app with the 'sudo -E' parameter. All worked fine.

But I am facing something curious. I cannot start GWorkspace or Terminal from then Run panel within wmaker,
neither from the autostart.
I must first run Xterm, where .bashrc is read, and then I can finally launch GWorkspace from there.

I guess something is missing when the X session is loading, but I could not find what.

Last precision : The wmaker session is started from SLIM X login.

Regards,

--
Bien cordialement,
Patrick CARDONA
On 2020-06-15 09:13:28 +0200 Johannes Brakensiek <[hidden email]> wrote:

> Hi Patrick,
>
> On 14 Jun 2020, at 23:15, Patrick Cardona via Discussion list for the GNUstep
> programming environment wrote:
>
>> I tried to make GNUstep from git according to the wiki :
>> http://wiki.gnustep.org/index.php/Building_GNUstep_under_Debian_FreeBSD
>
>> I am stuck at this step : building libobjc2.
>
>> These are the steps and things done :
>
>> Building GNUstep under Raspbian (Buster 10.4) :
>
>> Target: armv6k-unknown-linux-gnueabihf
>
> I don’t know the exact cause of your failure, so David might want to add
> valuable information here.
>
> But afaik some parts of libobjc2 2.0 are built from assembler code. The
> needed code for the armhf architecture does not exist yet. That architecture
> is 32bit. If you try the 64bit variant (aarch64) it should work afaik.
>
> If you want to build libobjc2 on armhf you will have to use the older version
> 1.9 of libobjc (which does not require clang >= 8, but works with older
> versions of clang as well).
>
> We have a script prepared for this which should install GNUstep by just
> running it:
> https://github.com/plaurent/gnustep-build/blob/master/raspbian-10-clang-7.0-runtime-1.9-ARM/GNUstep-buildon-raspbian10.sh
>
> If you are going to use aarch64 this one should work as well:
> https://github.com/plaurent/gnustep-build/blob/master/debian-10-clang-8.0/GNUstep-20-buildon-debian10.sh
>
> I’d be glad if David could approve this is correct.
>
> Also, it would be very nice if anybody would like to do the missing libobjc2
> assembler implementation for armhf. I think this is a common use case as long
> as the default arch for Raspbian is 32 bit. Even though this arch will be
> running out of support at some time in the future, of course.
>
> For anybody building libobjc2 on a Debian based platform: Please note there
> are also some very recent Debian source packages. I have not yet tried to
> build them, but I think that approach sounds very promising:
> https://github.com/trunkmaster/nextspace/tree/master/Packaging/Debian (this
> will only work if you try it on the supported platforms of course).
>
> Cheers
> Johannes
>


Reply | Threaded
Open this post in threaded view
|

Re: Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

David Chisnall-7
In reply to this post by Johannes Brakensiek

> On 15 Jun 2020, at 08:13, Johannes Brakensiek <[hidden email]> wrote:
>
> But afaik some parts of libobjc2 2.0 are built from assembler code. The needed code for the armhf architecture does not exist yet. That architecture is 32bit. If you try the 64bit variant (aarch64) it should work afaik.

I am really confused by this, because git blame tells me that I added those code paths 5 years ago.  As long as your compiler is defining __arm__ and __ARM_ARCH, but not defining __SOFT_FP__, we should be building the correct code paths.

> If you want to build libobjc2 on armhf you will have to use the older version 1.9 of libobjc (which does not require clang >= 8, but works with older versions of clang as well).

The v2 and v1 ABIs do not use different assembly fast paths.

> Also, it would be very nice if anybody would like to do the missing libobjc2 assembler implementation for armhf. I think this is a common use case as long as the default arch for Raspbian is 32 bit. Even though this arch will be running out of support at some time in the future, of course.

I did.  Five years ago.  Note that there was a bug until 15 months ago where the unwind info was not correctly set, so throwing an exception out of +initialize would potentially corrupt some floating point state.  

David


Reply | Threaded
Open this post in threaded view
|

Re: Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

Johannes Brakensiek
Thank you for your reply, David.

On 18 Jun 2020, at 10:46, David Chisnall wrote:

>> If you want to build libobjc2 on armhf you will have to use the older
>> version 1.9 of libobjc (which does not require clang >= 8, but works
>> with older versions of clang as well).

> The v2 and v1 ABIs do not use different assembly fast paths.

This is always a little bit confusing to me. Version 2.0 of libobjc2
supports v2 and v1 ABI, ok. But compiling only worked using the version
1.9 of libobjc2 (meaning the git tag/version, not the ABI version). Does
that sound correct to you?

>> Also, it would be very nice if anybody would like to do the missing
>> libobjc2 assembler implementation for armhf. I think this is a common
>> use case as long as the default arch for Raspbian is 32 bit. Even
>> though this arch will be running out of support at some time in the
>> future, of course.
>
>
> I did.  Five years ago.  Note that there was a bug until 15 months ago
> where the unwind info was not correctly set, so throwing an exception
> out of +initialize would potentially corrupt some floating point
> state.

That’s very good to read, thank you! Probably I read some outdated
documentation or was just using the 1.9 tag because Raspbian only had
clang 7 available then. I will try again with 2.0 and clang 8 and report
if I ran into the same issue as Patrick.

Johannes

Reply | Threaded
Open this post in threaded view
|

Re: Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

David Chisnall-7
On 18 Jun 2020, at 11:05, Johannes Brakensiek <[hidden email]> wrote:

>
> Thank you for your reply, David.
>
> On 18 Jun 2020, at 10:46, David Chisnall wrote:
>
>>> If you want to build libobjc2 on armhf you will have to use the older version 1.9 of libobjc (which does not require clang >= 8, but works with older versions of clang as well).
>
>> The v2 and v1 ABIs do not use different assembly fast paths.
>
> This is always a little bit confusing to me. Version 2.0 of libobjc2 supports v2 and v1 ABI, ok. But compiling only worked using the version 1.9 of libobjc2 (meaning the git tag/version, not the ABI version). Does that sound correct to you?

No, that’s very confusing.  Please file bug reports.  The trunk version should build on ARM and I have not seen any bug reports about it other than a brief report when we fixed some EH things and didn’t update the ARM versions.

>>> Also, it would be very nice if anybody would like to do the missing libobjc2 assembler implementation for armhf. I think this is a common use case as long as the default arch for Raspbian is 32 bit. Even though this arch will be running out of support at some time in the future, of course.
>>
>>
>> I did.  Five years ago.  Note that there was a bug until 15 months ago where the unwind info was not correctly set, so throwing an exception out of +initialize would potentially corrupt some floating point state.
>
> That’s very good to read, thank you! Probably I read some outdated documentation or was just using the 1.9 tag because Raspbian only had clang 7 available then. I will try again with 2.0 and clang 8 and report if I ran into the same issue as Patrick.

Thanks,

David


Reply | Threaded
Open this post in threaded view
|

Re: Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

Johannes Brakensiek
In reply to this post by David Chisnall-7
On 18 Jun 2020, at 10:46, David Chisnall wrote:

> I did.  Five years ago.  Note that there was a bug until 15 months ago
> where the unwind info was not correctly set, so throwing an exception
> out of +initialize would potentially corrupt some floating point
> state.

This runtime stuff really is higher arts for me, so I won’t be of much
help debugging. But I ran into an issue that seems to be connected to
something called „unwind“. ;)

Looking into the git history it seems to be connected to lastest
commit/PR.

https://github.com/gnustep/libobjc2/issues/164

It’s different to what Patrick reported, though. Running cmake with
clang-8 worked without issues.

Johannes

Reply | Threaded
Open this post in threaded view
|

Re: Trying to build GNUstep from git repo and clang-9 on Raspbian Buster (10.4)

Andreas Fink-2
I had no problems compiling gnustep9 on debian9-64bit on a raspberriy-pi.
However as always on debian, you must use the gold linker not the default one. Otherwise hell breaks loose.

And I didnt even try 32bit version (but it should work too from my experience in the past). The biggest problem for me under 32bit was to get a decent compiler version ( >= clang8) installed as the debian repo version has an issue which bites you with gnustep/libobjc2 badly. compiling clang from source under a Raspi is really no fun, especially if you dont have 8GB of RAM as the latest versions. 4GB might work but 2GB lets it constantly swap and being killed by OOM killer.


--
Sent from Canary

On Friday, Jun 19, 2020 at 7:47 PM, Johannes Brakensiek <[hidden email]> wrote:
On 18 Jun 2020, at 10:46, David Chisnall wrote:

I did. Five years ago. Note that there was a bug until 15 months ago
where the unwind info was not correctly set, so throwing an exception
out of +initialize would potentially corrupt some floating point
state.

This runtime stuff really is higher arts for me, so I won’t be of much
help debugging. But I ran into an issue that seems to be connected to
something called „unwind“. ;)

Looking into the git history it seems to be connected to lastest
commit/PR.

https://github.com/gnustep/libobjc2/issues/164

It’s different to what Patrick reported, though. Running cmake with
clang-8 worked without issues.

Johannes