advice on default options for building LLVM-GCC on Ubuntu Linux

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

advice on default options for building LLVM-GCC on Ubuntu Linux

Thomas Plum
it appears that by default some Apple configuration is assumed, since
a simple  make  complains

GNUmakefile:16: /CoreOS/Standard/Standard.make: No such file or
directory

We started with a subversion checkout, in case it matters.

--------------------------------------------------------------------+
Thomas Plum, Plum Hall Inc, 3 Waihona Box 44610, Kamuela HI 96743 USA
[hidden email] .......... TEL +1-808-882-1255 FAX +1-808-882-1556
http://www.PlumHall.com .... TOLLFREE +1-800-PLUM-HALL (800-758-6425)


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Tanya Lattner-2


Are you following the configuration/build directions in the README.LLVM?
You need to follow these exactly.

Please specify your configure command and target information.

-Tanya

On Thu, 2 Apr 2009, Thomas Plum wrote:

> it appears that by default some Apple configuration is assumed, since
> a simple  make  complains
>
> GNUmakefile:16: /CoreOS/Standard/Standard.make: No such file or
> directory
>
> We started with a subversion checkout, in case it matters.
>
> --------------------------------------------------------------------+
> Thomas Plum, Plum Hall Inc, 3 Waihona Box 44610, Kamuela HI 96743 USA
> [hidden email] .......... TEL +1-808-882-1255 FAX +1-808-882-1556
> http://www.PlumHall.com .... TOLLFREE +1-800-PLUM-HALL (800-758-6425)
>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Thomas Plum
In reply to this post by Thomas Plum

>it appears that by default some Apple configuration is
>assumed, since a simple  make  complains
>
>GNUmakefile:16: /CoreOS/Standard/Standard.make: No such file
>or directory
>
>We started with a subversion checkout, in case it matters.

Never mind, we're going to start with CLANG instead.  (We'll
send more questions as they come up ...)

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Duncan Sands
In reply to this post by Thomas Plum
Hi Thomas,

> it appears that by default some Apple configuration is assumed, since
> a simple  make  complains
>
> GNUmakefile:16: /CoreOS/Standard/Standard.make: No such file or
> directory
>
> We started with a subversion checkout, in case it matters.

you need to use a separate objects directory and not build directly
in the llvm-gcc tree.  For some reason the Apple people placed a file
GNUmakefile in the tree which "make" chooses in preference to the Makefile
produced by configuring.  Personally I would like to see GNUmakefile
deleted.  If you want to build directly in the gcc tree, try deleting
this file.

Ciao,

Duncan.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Mike Stump
On Apr 4, 2009, at 6:17 AM, Duncan Sands wrote:
> you need to use a separate objects directory and not build directly
> in the llvm-gcc tree.  For some reason the Apple people placed a file
> GNUmakefile in the tree which "make" chooses in preference to the  
> Makefile
> produced by configuring.  Personally I would like to see GNUmakefile
> deleted.

My take, you can test an environment variable called RC_RELEASE in the  
GNUmakefile and use it, if set, and if it isn't set, include Makefile  
and use it in preference.  Oh course, this is untested, someone would  
have to test it in all three environments.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Duncan Sands
On Saturday 04 April 2009 19:12:55 Mike Stump wrote:

> On Apr 4, 2009, at 6:17 AM, Duncan Sands wrote:
> > you need to use a separate objects directory and not build directly
> > in the llvm-gcc tree.  For some reason the Apple people placed a file
> > GNUmakefile in the tree which "make" chooses in preference to the  
> > Makefile
> > produced by configuring.  Personally I would like to see GNUmakefile
> > deleted.
>
> My take, you can test an environment variable called RC_RELEASE in the  
> GNUmakefile and use it, if set, and if it isn't set, include Makefile  
> and use it in preference.  Oh course, this is untested, someone would  
> have to test it in all three environments.

Non-apple people build from svn too, not just releases.  My take is that
Apple should have their own build script which passes "make" whichever file
they want to use as the makefile, so then it doesn't need a special name
like GNUmakefile.  Actually, doesn't Apple use a build script already?

Ciao,

Duncan.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Bill Wendling
On Apr 5, 2009, at 7:13 AM, Duncan Sands wrote:

> On Saturday 04 April 2009 19:12:55 Mike Stump wrote:
>> On Apr 4, 2009, at 6:17 AM, Duncan Sands wrote:
>>> you need to use a separate objects directory and not build directly
>>> in the llvm-gcc tree.  For some reason the Apple people placed a  
>>> file
>>> GNUmakefile in the tree which "make" chooses in preference to the
>>> Makefile
>>> produced by configuring.  Personally I would like to see GNUmakefile
>>> deleted.
>>
>> My take, you can test an environment variable called RC_RELEASE in  
>> the
>> GNUmakefile and use it, if set, and if it isn't set, include Makefile
>> and use it in preference.  Oh course, this is untested, someone would
>> have to test it in all three environments.
>
> Non-apple people build from svn too, not just releases.  My take is  
> that
> Apple should have their own build script which passes "make"  
> whichever file
> they want to use as the makefile, so then it doesn't need a special  
> name
> like GNUmakefile.  Actually, doesn't Apple use a build script already?
>
We use GNUmakefile to trigger using the build_gcc script. It's not  
ideal, but it's all we have at the moment. For LLVM, we placed those  
files in a subdirectory. This isn't ideal because of our build  
processes, but was better than the alternative. We would *really*  
prefer not doing the same thing to LLVM-GCC. Because we've been  
building LLVM-GCC with srcdir != objdir for years now, it shouldn't be  
too much of a burden. . .

 From what I understand, FSF GCC doesn't recommend building with  
srcdir == objdir. Not that this necessarily means much to us, but  
should indicate that it's not entirely out of the ordinary that we  
require srcdir != objdir for LLVM-GCC. :-)

-bw

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Duncan Sands
Hi Bill,

> We use GNUmakefile to trigger using the build_gcc script.

thanks for the explanation, but I still don't understand why
it is done this way.  Why not just get Apple people to run some
script, rather than trying to have "make" automagically do an
Apple build?

> It's not  
> ideal, but it's all we have at the moment. For LLVM, we placed those  
> files in a subdirectory. This isn't ideal because of our build  
> processes, but was better than the alternative. We would *really*  
> prefer not doing the same thing to LLVM-GCC. Because we've been  
> building LLVM-GCC with srcdir != objdir for years now, it shouldn't be  
> too much of a burden. . .
>
>  From what I understand, FSF GCC doesn't recommend building with  
> srcdir == objdir. Not that this necessarily means much to us, but  
> should indicate that it's not entirely out of the ordinary that we  
> require srcdir != objdir for LLVM-GCC. :-)

Newcomers to llvm-gcc regularly try to build with srcdir == objdir.
Some of them come on irc and ask about why it fails, but probably
most of them just give up on llvm-gcc.

Ciao,

Duncan.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Bill Wendling
On Tue, Apr 7, 2009 at 12:38 AM, Duncan Sands <[hidden email]> wrote:
> Hi Bill,
>
>> We use GNUmakefile to trigger using the build_gcc script.
>
> thanks for the explanation, but I still don't understand why
> it is done this way.  Why not just get Apple people to run some
> script, rather than trying to have "make" automagically do an
> Apple build?
>
It's more complicated than that. Suffice it to say that we wouldn't be
able to get the people who need to use GNUmakefile/build_gcc to change
just for our team (it's more than just our team that is required to do
this). In truth, they do have this. It's called "xcodebuild". But
llvm-gcc is very incompatible with this method of building.

>> It's not
>> ideal, but it's all we have at the moment. For LLVM, we placed those
>> files in a subdirectory. This isn't ideal because of our build
>> processes, but was better than the alternative. We would *really*
>> prefer not doing the same thing to LLVM-GCC. Because we've been
>> building LLVM-GCC with srcdir != objdir for years now, it shouldn't be
>> too much of a burden. . .
>>
>>  From what I understand, FSF GCC doesn't recommend building with
>> srcdir == objdir. Not that this necessarily means much to us, but
>> should indicate that it's not entirely out of the ordinary that we
>> require srcdir != objdir for LLVM-GCC. :-)
>
> Newcomers to llvm-gcc regularly try to build with srcdir == objdir.
> Some of them come on irc and ask about why it fails, but probably
> most of them just give up on llvm-gcc.
>
I understand. Believe me, I'm not a big fan of this method of building
llvm-gcc either. But I'm not a Makefile guru, so I don't know how to
make the two systems of building llvm-gcc compatible. Is there a FAQ
entry on this? If not, I'll add one.

-bw

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Bob Wilson-3

On Apr 7, 2009, at 11:17 AM, Bill Wendling wrote:
> I understand. Believe me, I'm not a big fan of this method of building
> llvm-gcc either. But I'm not a Makefile guru, so I don't know how to
> make the two systems of building llvm-gcc compatible. Is there a FAQ
> entry on this? If not, I'll add one.


If we don't know how to fix the problem, maybe we could at least make  
the failures easier to understand.  If someone is trying to build llvm-
gcc, they will typically not run "make install" as the first step.  
The normal GCC makefile has a default target of "all", so a typical  
GCC build will invoke make with no explicit target  or with a target  
such as "all", "bootstrap", "all-gcc", etc.  We could add those  
targets to the GNUmakefile in a rule that prints a message about  
building with objdir != srcdir.

It looks to me like Apple's build system will always invoke make with  
an explicit target, so it would be OK to make this new rule be the  
default target.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Tanya Lattner-2
In reply to this post by Bill Wendling

>>>  From what I understand, FSF GCC doesn't recommend building with
>>> srcdir == objdir. Not that this necessarily means much to us, but
>>> should indicate that it's not entirely out of the ordinary that we
>>> require srcdir != objdir for LLVM-GCC. :-)
>>
>> Newcomers to llvm-gcc regularly try to build with srcdir == objdir.
>> Some of them come on irc and ask about why it fails, but probably
>> most of them just give up on llvm-gcc.
>>
> I understand. Believe me, I'm not a big fan of this method of building
> llvm-gcc either. But I'm not a Makefile guru, so I don't know how to
> make the two systems of building llvm-gcc compatible. Is there a FAQ
> entry on this? If not, I'll add one.
This is stated in the README.LLVM and people rarely follow the directions
in there too. You can't force people to read documentation.

Its worth a FAQ entry and also a FAQ entry about following the
instructions in README.LLVM exactly.

-Tanya
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Bill Wendling
In reply to this post by Bob Wilson-3
On Tue, Apr 7, 2009 at 11:39 AM, Bob Wilson <[hidden email]> wrote:

>
> On Apr 7, 2009, at 11:17 AM, Bill Wendling wrote:
>> I understand. Believe me, I'm not a big fan of this method of building
>> llvm-gcc either. But I'm not a Makefile guru, so I don't know how to
>> make the two systems of building llvm-gcc compatible. Is there a FAQ
>> entry on this? If not, I'll add one.
>
>
> If we don't know how to fix the problem, maybe we could at least make
> the failures easier to understand.  If someone is trying to build llvm-
> gcc, they will typically not run "make install" as the first step.
> The normal GCC makefile has a default target of "all", so a typical
> GCC build will invoke make with no explicit target  or with a target
> such as "all", "bootstrap", "all-gcc", etc.  We could add those
> targets to the GNUmakefile in a rule that prints a message about
> building with objdir != srcdir.
>
> It looks to me like Apple's build system will always invoke make with
> an explicit target, so it would be OK to make this new rule be the
> default target.
>
Good point. I'll investigate to see if that works. Thanks!

-bw

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Dale Johannesen
In reply to this post by Tanya Lattner-2

On Apr 7, 2009, at 11:47 AMPDT, Tanya M. Lattner wrote:

>
>>>>  From what I understand, FSF GCC doesn't recommend building with
>>>> srcdir == objdir. Not that this necessarily means much to us, but
>>>> should indicate that it's not entirely out of the ordinary that we
>>>> require srcdir != objdir for LLVM-GCC. :-)
>>>
>>> Newcomers to llvm-gcc regularly try to build with srcdir == objdir.
>>> Some of them come on irc and ask about why it fails, but probably
>>> most of them just give up on llvm-gcc.

If they can't figure out how to find and read a README file, do we  
really want them?

>> I understand. Believe me, I'm not a big fan of this method of  
>> building
>> llvm-gcc either. But I'm not a Makefile guru, so I don't know how to
>> make the two systems of building llvm-gcc compatible. Is there a FAQ
>> entry on this? If not, I'll add one.
>
> This is stated in the README.LLVM and people rarely follow the  
> directions in there too. You can't force people to read documentation.

No you can't, but you need not be sympathetic when they don't.

You can't really build gcc without reading at least some of the  
documentation either.  The problem we have is that some people come in  
expecting the build procedure to be identical to that of gcc, and it  
isn't.   (Calling it llvm-gcc doesn't help, but it's too late now.)

Perhaps:

% make
A make target is required.  If you think you know how to build llvm-
gcc just because you know how to build gcc, you're wrong.  Please read  
README.LLVM.

Did I mention there's a reason I don't do user interfaces? :)

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: advice on default options for building LLVM-GCC on Ubuntu Linux

Bob Wilson-3
In reply to this post by Bill Wendling

On Apr 7, 2009, at 12:01 PM, Bill Wendling wrote:

> On Tue, Apr 7, 2009 at 11:39 AM, Bob Wilson <[hidden email]>  
> wrote:
>>
>> On Apr 7, 2009, at 11:17 AM, Bill Wendling wrote:
>>> I understand. Believe me, I'm not a big fan of this method of  
>>> building
>>> llvm-gcc either. But I'm not a Makefile guru, so I don't know how to
>>> make the two systems of building llvm-gcc compatible. Is there a FAQ
>>> entry on this? If not, I'll add one.
>>
>>
>> If we don't know how to fix the problem, maybe we could at least make
>> the failures easier to understand.  If someone is trying to build  
>> llvm-
>> gcc, they will typically not run "make install" as the first step.
>> The normal GCC makefile has a default target of "all", so a typical
>> GCC build will invoke make with no explicit target  or with a target
>> such as "all", "bootstrap", "all-gcc", etc.  We could add those
>> targets to the GNUmakefile in a rule that prints a message about
>> building with objdir != srcdir.
>>
>> It looks to me like Apple's build system will always invoke make with
>> an explicit target, so it would be OK to make this new rule be the
>> default target.
>>
> Good point. I'll investigate to see if that works. Thanks!

I tried it out and it seems to work.  I went ahead and committed the  
change.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev