Trouble building base with clang

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

Trouble building base with clang

Philip George
Steppers,

I'm stuck trying to build GNUstep using clang on Raspbian 9 (Debian) running on ARM 7.

Here is the guide I'm using (which even after a couple of years is still pretty good, save for a couple of caveats due to changes since its publication)...


I've successfully built and installed all of the prereq's (boehm-gc, gnustep-make & libobjc2) using clang.

The base project fails however when it gets to 'Tools/autogsdoc'.

Here's the configure/make pair I used to kick off the libs-base build using clang:

./configure CC=clang CXX=clang++ LD=gcc
make CC=clang CXX=clang++ LD=gcc messages=yes

It does great for a while, but then suddenly/inexplicably for 'Tools/autogsdoc', it switches from using clang to using gcc.

gcc then of course barfs the moment it sees a clang-specific flag it doesn't recognize.

So the question is: Why did it suddenly switch to gcc after a half hour or so purring along with clang?

I looked thru the makefiles but it's not jumping out at me, but then again that means nothing since I haven't worked on a makefile-based project in years. Whatever comes after 'rusty'... that's what I am re: makefiles.

Thanks/cheers.
Philip



_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Trouble building base with clang

Fred Kiefer
Hi Philip,

could you please provide the log messages you get from running those commands? At least the error message?

And you definitely shouldn’t be using the Boehm GC any more. I did not look into the guide to see what else is outdated there. I am not using clang myself, except for a Dockerfile that I use to get the Coverity scan results for GNUstep base.

Cheers,
Fred

> Am 22.10.2018 um 00:46 schrieb Philip George <[hidden email]>:
>
> Steppers,
>
> I'm stuck trying to build GNUstep using clang on Raspbian 9 (Debian) running on ARM 7.
>
> Here is the guide I'm using (which even after a couple of years is still pretty good, save for a couple of caveats due to changes since its publication)...
>
> http://wiki.gnustep.org/index.php/Building_GNUstep_with_Clang
>
> I've successfully built and installed all of the prereq's (boehm-gc, gnustep-make & libobjc2) using clang.
>
> The base project fails however when it gets to 'Tools/autogsdoc'.
>
> Here's the configure/make pair I used to kick off the libs-base build using clang:
>
> ./configure CC=clang CXX=clang++ LD=gcc
> make CC=clang CXX=clang++ LD=gcc messages=yes
>
> It does great for a while, but then suddenly/inexplicably for 'Tools/autogsdoc', it switches from using clang to using gcc.
>
> gcc then of course barfs the moment it sees a clang-specific flag it doesn't recognize.
>
> So the question is: Why did it suddenly switch to gcc after a half hour or so purring along with clang?
>
> I looked thru the makefiles but it's not jumping out at me, but then again that means nothing since I haven't worked on a makefile-based project in years. Whatever comes after 'rusty'... that's what I am re: makefiles.
>
> Thanks/cheers.
> Philip
>
>
> _______________________________________________
> Discuss-gnustep mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Trouble building base with clang

Wolfgang Lux
In reply to this post by Philip George


> Am 22.10.2018 um 00:46 schrieb Philip George <[hidden email]>:
>
> Here's the configure/make pair I used to kick off the libs-base build using clang:
>
> ./configure CC=clang CXX=clang++ LD=gcc
> make CC=clang CXX=clang++ LD=gcc messages=yes

I'm not sure if it's related to the build failure, but why are you asking for gcc as linker here? If you are using clang for builds, it would look more sane to me to use LD=clang.

Wolfgang


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Trouble building base with clang

Riccardo Mottola-5
Hi,

Wolfgang Lux wrote:
>> ./configure CC=clang CXX=clang++ LD=gcc
>> make CC=clang CXX=clang++ LD=gcc messages=yes
> I'm not sure if it's related to the build failure, but why are you asking for gcc as linker here? If you are using clang for builds, it would look more sane to me to use LD=clang.

actually, my favourite is issuing CC CXX to "make", which will then set
gnustep-config correctly.
All GNUstep projects which are well behaved should pick teh default
compiler up, so you don't need to say "clang" to any other project.

I fixed all packages I work with to honor these env. variables. If you
have issues, please report them.

Riccardo

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Trouble building base with clang

Philip George-2
In reply to this post by Wolfgang Lux
Wolfgang,

I thought this looked wrong too, but since the instructions explicitly stated it this way I assumed that it was some peculiarity of GNUstep+clang.

I'll try it with LD=clang this evening.

Thanks.

Philip





On Mon, Oct 22, 2018 at 3:53 AM Wolfgang Lux <[hidden email]> wrote:


> Am 22.10.2018 um 00:46 schrieb Philip George <[hidden email]>:
>
> Here's the configure/make pair I used to kick off the libs-base build using clang:
>
> ./configure CC=clang CXX=clang++ LD=gcc
> make CC=clang CXX=clang++ LD=gcc messages=yes

I'm not sure if it's related to the build failure, but why are you asking for gcc as linker here? If you are using clang for builds, it would look more sane to me to use LD=clang.

Wolfgang


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Trouble building base with clang

Philip George
In reply to this post by Wolfgang Lux
Wolfgang,

I thought this looked wrong too, but since the instructions explicitly stated it this way I assumed that it was some peculiarity of GNUstep+clang.

I'll try it with LD=clang this evening.

Thanks.

Philip


On Mon, Oct 22, 2018 at 3:53 AM Wolfgang Lux <[hidden email]> wrote:


> Am 22.10.2018 um 00:46 schrieb Philip George <[hidden email]>:
>
> Here's the configure/make pair I used to kick off the libs-base build using clang:
>
> ./configure CC=clang CXX=clang++ LD=gcc
> make CC=clang CXX=clang++ LD=gcc messages=yes

I'm not sure if it's related to the build failure, but why are you asking for gcc as linker here? If you are using clang for builds, it would look more sane to me to use LD=clang.

Wolfgang


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Trouble building base with clang

David Chisnall-7
In reply to this post by Philip George-2
On 22/10/2018 10:54, Philip George wrote:
> I thought this looked wrong too, but since the instructions explicitly
> stated it this way I assumed that it was some peculiarity of GNUstep+clang.

This was necessary around 2008, when clang didn't provide a
gcc-compatible linker driver.  It sounds as if the instructions that
you're following are at least 7-8 years old and may well be out of date
in other exciting ways.

David

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Trouble building base with clang

Richard Frith-Macdonald-9
In reply to this post by Philip George
> On 21 Oct 2018, at 23:46, Philip George <[hidden email]> wrote:
>
> Steppers,
>
> I'm stuck trying to build GNUstep using clang on Raspbian 9 (Debian) running on ARM 7.
>
> Here is the guide I'm using (which even after a couple of years is still pretty good, save for a couple of caveats due to changes since its publication)...
>
> http://wiki.gnustep.org/index.php/Building_GNUstep_with_Clang


I edited that obsolete page to reflect current instructions.
_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep