creating new llvm project?

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

creating new llvm project?

Matthew O'Connor
Hi all,

I'm in the process of creating a new LLVM project based on the instructions from http://llvm.org/docs/Projects.html.

I have a bunch of questions:

  1. What is the relationship between CMake and the configure + Makefile build systems for LLVM? If I intend to just use configure + Makefile, do I need to worry about any of the CMake stuff?

  2. My first attempt was to copy the sample project, tweak the autoconf stuff, and remake. I ended up getting the follow error:
    llvm[2]: Linking Release+Asserts executable exe (without symbols)
    llvm/Release+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
    Process.cpp:(.text+0x525): undefined reference to `setupterm'
    Process.cpp:(.text+0x52e): undefined reference to `has_colors'
  It appears that the sample project doesn't contain a library dependency on vterm. In comparing the autoconf in sample with the one at the parent of LLVM, the sample one doesn't contain references to vterm. Is this intentional?

  3. I decided to go the "simple" route of just hardcoding a Makefile that includes a Makefile.common that I wrote that hardcode defines LLVM_SRC_ROOT, LLVM_OBJ_ROOT, etc.
  When I did this, I got an error about a missing configure, so I added one. My next build complained about a missing config.status, so I added one. Neither of them do anything.
  At this point, I was able to build my library & tool without any issues.
  Is the intention that only configure exists in the source repository and that running it creates the config.status script?
  Is the intention of the config.status script that it recreates a configuration based on how it was configured?

  4. I find all of the autoconf stuff somewhat confusing & overwhelming. I'd like to find a simpler configure script that does the appropriate variable substitution in my Makefile.common. Is there a reasonable example of that? Or would it be better to learn how to properly generate the autoconf configure scripts?

Thanks,
Matthew


_______________________________________________
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: creating new llvm project?

Óscar Fuentes
"Matthew O'Connor" <[hidden email]> writes:

> I'm in the process of creating a new LLVM project based on the instructions
> from http://llvm.org/docs/Projects.html.
>
> I have a bunch of questions:
>
>   1. What is the relationship between CMake and the configure + Makefile
> build systems for LLVM? If I intend to just use configure + Makefile, do I
> need to worry about any of the CMake stuff?

No, until you submit your project for incorporating into LLVM. At that
time, you can ask for help or create the CMake stuff by replicating what
similar parts of LLVM do (it's quite simple and repetitive.)

If your project is not intended to be distributed with LLVM, you can
ignore CMake (*)

I don't know the traditional build so I can't help you with the other
questions.

* From time to time some LLVM developer proposes to ditch the
  traditional build and use CMake only. It can actually happen at some
  distant future.
_______________________________________________
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: creating new llvm project?

Matthew O'Connor
On Mon, Aug 12, 2013 at 2:34 PM, Óscar Fuentes <[hidden email]> wrote:
"Matthew O'Connor" <[hidden email]> writes:

> I'm in the process of creating a new LLVM project based on the instructions
> from http://llvm.org/docs/Projects.html.
>
> I have a bunch of questions:
>
>   1. What is the relationship between CMake and the configure + Makefile
> build systems for LLVM? If I intend to just use configure + Makefile, do I
> need to worry about any of the CMake stuff?

No, until you submit your project for incorporating into LLVM. At that
time, you can ask for help or create the CMake stuff by replicating what
similar parts of LLVM do (it's quite simple and repetitive.)

If your project is not intended to be distributed with LLVM, you can
ignore CMake (*)

I don't know the traditional build so I can't help you with the other
questions.

* From time to time some LLVM developer proposes to ditch the
  traditional build and use CMake only. It can actually happen at some
  distant future.

This project will not be incorporated into LLVM.

How realistic is the possibility of moving to CMake only?


_______________________________________________
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: creating new llvm project?

David Chisnall-5
On 12 Aug 2013, at 22:22, "Matthew O'Connor" <[hidden email]> wrote:

> How realistic is the possibility of moving to CMake only?

It's been discussed frequently over the past 18 months.  Most things work better (or exclusively) with CMake.  A few (important) things only work, or work better, with autoconf.  Getting CMake up to the standard where it supports a superset of what autoconf supports is required for dropping autoconf, and no one has volunteered to do it (which is understandable: none of the people who use CMake have the use cases where autoconf is better - if they did, then they'd be using autoconf).

David


_______________________________________________
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: creating new llvm project?

Stephen Checkoway

On Aug 13, 2013, at 4:51 AM, David Chisnall <[hidden email]> wrote:

> Getting CMake up to the standard where it supports a superset of what autoconf supports is required for dropping autoconf

Is there a list somewhere of what autoconf supports that CMake does not (and that people care about)? It could be that people simply don't know what's missing since, as you point out, those using CMake don't need those features.

--
Stephen Checkoway






_______________________________________________
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: creating new llvm project?

Tom Browder
On Tue, Aug 13, 2013 at 4:04 PM, Stephen Checkoway <[hidden email]> wrote:
>
> On Aug 13, 2013, at 4:51 AM, David Chisnall <[hidden email]> wrote:
>
>> Getting CMake up to the standard where it supports a superset of what autoconf supports is required for dropping autoconf
>
> Is there a list somewhere of what autoconf supports that CMake does not (and that people care about)? It could be that people simply don't know what's missing since, as you point out, those using CMake don't need those features.

FWIW, the open source project BRL-CAD (http://brlcad.org) has
deprecated its autotools buld system and has a very complex (and old:
30+ years, 1M+ source lines, but modernized and actively maintained) C
(and C++) code base now completely supported by CMake.

IMHO, you can probably find any use case there, and the developers
love to share information.

Note also that support for using clang and clang++ (in lieu of gcc and
g++) as build tools is being tested on the svn trunk but, as far as I
know, its successful build ability is not yet a requirement for a
release.

Best regards,

-Tom
_______________________________________________
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: creating new llvm project?

Du Toit, Stefanus
In reply to this post by Stephen Checkoway
On 2013-08-13 5:04 PM, "Stephen Checkoway" <[hidden email]> wrote:

>On Aug 13, 2013, at 4:51 AM, David Chisnall <[hidden email]>
>wrote:
>>Getting CMake up to the standard where it supports a superset of what
>>autoconf supports is required for dropping autoconf
>
>Is there a list somewhere of what autoconf supports that CMake does not
>(and that people care about)? It could be that people simply don't know
>what's missing since, as you point out, those using CMake don't need
>those features.

This is a recurring topic on this mailing list; the most recent thread
about it is here:

http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-May/thread.html#62351

I'm not aware of a single place where all the discrepancies are
documented, but that thread contains some summaries of what's missing.
I'll leave digging those out as an exercise for the reader...

Stefanus

--
Stefanus Du Toit <[hidden email]>
Intel Waterloo




_______________________________________________
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: creating new llvm project?

Matthew O'Connor
In reply to this post by Matthew O'Connor
Only my first question (the one about CMake) was answered. Would someone be willing to answer my other questions so I can understand & pursue that route instead?


On Mon, Aug 12, 2013 at 2:19 PM, Matthew O'Connor <[hidden email]> wrote:
Hi all,

I'm in the process of creating a new LLVM project based on the instructions from http://llvm.org/docs/Projects.html.

I have a bunch of questions:

  1. What is the relationship between CMake and the configure + Makefile build systems for LLVM? If I intend to just use configure + Makefile, do I need to worry about any of the CMake stuff?

  2. My first attempt was to copy the sample project, tweak the autoconf stuff, and remake. I ended up getting the follow error:
    llvm[2]: Linking Release+Asserts executable exe (without symbols)
    llvm/Release+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
    Process.cpp:(.text+0x525): undefined reference to `setupterm'
    Process.cpp:(.text+0x52e): undefined reference to `has_colors'
  It appears that the sample project doesn't contain a library dependency on vterm. In comparing the autoconf in sample with the one at the parent of LLVM, the sample one doesn't contain references to vterm. Is this intentional?

  3. I decided to go the "simple" route of just hardcoding a Makefile that includes a Makefile.common that I wrote that hardcode defines LLVM_SRC_ROOT, LLVM_OBJ_ROOT, etc.
  When I did this, I got an error about a missing configure, so I added one. My next build complained about a missing config.status, so I added one. Neither of them do anything.
  At this point, I was able to build my library & tool without any issues.
  Is the intention that only configure exists in the source repository and that running it creates the config.status script?
  Is the intention of the config.status script that it recreates a configuration based on how it was configured?

  4. I find all of the autoconf stuff somewhat confusing & overwhelming. I'd like to find a simpler configure script that does the appropriate variable substitution in my Makefile.common. Is there a reasonable example of that? Or would it be better to learn how to properly generate the autoconf configure scripts?

Thanks,
Matthew



_______________________________________________
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: creating new llvm project?

Eric Christopher
In reply to this post by Matthew O'Connor
On Mon, Aug 12, 2013 at 2:22 PM, Matthew O'Connor
<[hidden email]> wrote:

> On Mon, Aug 12, 2013 at 2:34 PM, Óscar Fuentes <[hidden email]> wrote:
>>
>> "Matthew O'Connor" <[hidden email]> writes:
>>
>> > I'm in the process of creating a new LLVM project based on the
>> > instructions
>> > from http://llvm.org/docs/Projects.html.
>> >
>> > I have a bunch of questions:
>> >
>> >   1. What is the relationship between CMake and the configure + Makefile
>> > build systems for LLVM? If I intend to just use configure + Makefile, do
>> > I
>> > need to worry about any of the CMake stuff?
>>
>> No, until you submit your project for incorporating into LLVM. At that
>> time, you can ask for help or create the CMake stuff by replicating what
>> similar parts of LLVM do (it's quite simple and repetitive.)
>>
>> If your project is not intended to be distributed with LLVM, you can
>> ignore CMake (*)
>>
>> I don't know the traditional build so I can't help you with the other
>> questions.
>>
>> * From time to time some LLVM developer proposes to ditch the
>>   traditional build and use CMake only. It can actually happen at some
>>   distant future.
>
>
> This project will not be incorporated into LLVM.
>

Then which build system likely doesn't matter for you?

> How realistic is the possibility of moving to CMake only?
>

Right now? Not particularly though things could change. The email
thread referenced later in this thread sums up the reasons, etc.

-eric

_______________________________________________
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: creating new llvm project?

Matthew O'Connor
On Tue, Aug 27, 2013 at 3:32 PM, Eric Christopher <[hidden email]> wrote:
Then which build system likely doesn't matter for you?

I'd like to take advantage of the build work that LLVM has done so that we don't have to spend as much time maintaining our build when we can just mimic LLVM's + we'd get the build support for how tools, libraries, includes, and tests are built.


_______________________________________________
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: creating new llvm project?

Eric Christopher


On Sep 2, 2013 9:36 AM, "Matthew O'Connor" <[hidden email]> wrote:
>
> On Tue, Aug 27, 2013 at 3:32 PM, Eric Christopher <[hidden email]> wrote:
>>
>> Then which build system likely doesn't matter for you?
>
>
> I'd like to take advantage of the build work that LLVM has done so that we don't have to spend as much time maintaining our build when we can just mimic LLVM's + we'd get the build support for how tools, libraries, includes, and tests are built.
>

Either of them should suit your needs. The autoconf support is more mature, the cmake support is more flexible.

-eric


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev