Ubuntu install location fixes

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

Ubuntu install location fixes

Gonsolo
Hi!

Here are fixes for clang on my system (Ubuntu 9.10 32 bit).

One remaining breakage:

/tmp/cc-UZRrfs.o:(.gnu.linkonce.r._ZZ18__gthread_active_pvE20__gthread_active_ptr+0x0):
undefined reference to `__gthrw_pthread_cancel(unsigned long)'
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [bla] Error 1

with this testcase:

#include <string>

int main()
{
        std::string bla;
        return 0;
}

Is this problem known?

g

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

0001-Move-Ubuntu-install-location.patch (2K) Download Attachment
0002-Fix-Ubuntu-32-bit-install-location.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Riccardo Magliocchetti
Hello,

Gonsolo ha scritto:
> Hi!
>
> Here are fixes for clang on my system (Ubuntu 9.10 32 bit).

I was sending a similar patch for debian sid which currently has stdc++ 4.4 that you can
find attached. I see that at least a couple of ubuntu distribution have the very same
version, do you think we consolidate the paths a bit at least for debian and ubuntu?

thanks,
riccardo

Index: lib/Frontend/InitHeaderSearch.cpp
===================================================================
--- lib/Frontend/InitHeaderSearch.cpp (revisione 96342)
+++ lib/Frontend/InitHeaderSearch.cpp (copia locale)
@@ -489,8 +489,10 @@
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.3",
                                 "i686-pc-linux-gnu", "", "", triple);
     // Debian sid
-    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.2",
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
                                 "x86_64-linux-gnu", "32", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
+                                "i486-linux-gnu", "", "", triple);
     // Ubuntu 7.10 - Gutsy Gibbon
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.3",
                                 "i486-linux-gnu", "", "", triple);

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Gonsolo
Am 02/16/2010 01:25 PM, schrieb Riccardo Magliocchetti:

> Hello,
>
> Gonsolo ha scritto:
>> Hi!
>>
>> Here are fixes for clang on my system (Ubuntu 9.10 32 bit).
>
> I was sending a similar patch for debian sid which currently has stdc++
> 4.4 that you can find attached. I see that at least a couple of ubuntu
> distribution have the very same version, do you think we consolidate the
> paths a bit at least for debian and ubuntu?
I merged Ubuntu 9.10 and Debian sid. Patches attached.

g


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

0001-Move-Ubuntu-install-location.patch (2K) Download Attachment
0002-Fix-Ubuntu-32-bit-install-location.patch (1K) Download Attachment
0003-Update-Debian-Include-Paths.patch (1K) Download Attachment
0004-Merge-Ubuntu-and-Debian-include-paths.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Riccardo Magliocchetti
Gonsolo ha scritto:

> Am 02/16/2010 01:25 PM, schrieb Riccardo Magliocchetti:
>> Hello,
>>
>> Gonsolo ha scritto:
>>> Hi!
>>>
>>> Here are fixes for clang on my system (Ubuntu 9.10 32 bit).
>>
>> I was sending a similar patch for debian sid which currently has stdc++
>> 4.4 that you can find attached. I see that at least a couple of ubuntu
>> distribution have the very same version, do you think we consolidate the
>> paths a bit at least for debian and ubuntu?
>
> I merged Ubuntu 9.10 and Debian sid. Patches attached.
>
> g
>

Since next stable debian will be released with 4.4 i think that the comment should say
squeeze. Then could you please diff the four patches in one for easier review / test?

thanks a lot,
riccardo
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Gonsolo
> Since next stable debian will be released with 4.4 i think that the
> comment should say squeeze. Then could you please diff the four patches
> in one for easier review / test?

I donẗ know about Debian, I just did what you suggested. Can you provide
a patch?

I use git for developing which automatically generates my patches. Isn't
it easier to review with modular patches?

g
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Riccardo Magliocchetti
Hello again :)

Gonsolo ha scritto:
>> Since next stable debian will be released with 4.4 i think that the
>> comment should say squeeze. Then could you please diff the four patches
>> in one for easier review / test?
>
> I donẗ know about Debian, I just did what you suggested. Can you provide
> a patch?

I just meant to rename "Sid" to "squeeze". Anyway not a big issue, we can remove the
debian Sid entry and remove the ubuntu 8.10 entry which is wrong. Ubuntu 8.10 path is the
same as 9.04 and debian squeeze / sid for now are the same as 9.10. So attached you can
find a patch that consolidates the ubuntu paths.

Since this can lead to some confusion to non debian / ubuntu users we have to make some
premises: first we have a link from /usr/include/c++/x.y to /usr/include/c++/x.y.z, then
x.y.z may vary during debian testing and unstable development.

> I use git for developing which automatically generates my patches. Isn't
> it easier to review with modular patches?

You move then delete the same hunk of code in two different patches, that's difficult to
follow for me.

thanks,
riccardo


Index: lib/Frontend/InitHeaderSearch.cpp
===================================================================
--- lib/Frontend/InitHeaderSearch.cpp (revisione 96342)
+++ lib/Frontend/InitHeaderSearch.cpp (copia locale)
@@ -488,18 +488,19 @@
                                 "x86_64-pc-linux-gnu", "32", "", triple);
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.3",
                                 "i686-pc-linux-gnu", "", "", triple);
-    // Debian sid
-    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.2",
-                                "x86_64-linux-gnu", "32", "", triple);
     // Ubuntu 7.10 - Gutsy Gibbon
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.3",
                                 "i486-linux-gnu", "", "", triple);
     // Ubuntu 9.04
-    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.3",
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
                                 "x86_64-linux-gnu","32", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
+                                "i486-linux-gnu","", "", triple);
     // Ubuntu 9.10
-    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.1",
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
                                 "x86_64-linux-gnu", "32", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
+                                "i486-linux-gnu", "", "", triple);
     // Fedora 8
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.2",
                                 "i386-redhat-linux", "", "", triple);
@@ -554,12 +555,6 @@
     AddGnuCPlusPlusIncludePaths(
       "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4",
       "i686-pc-linux-gnu", "", "", triple);
-    // Ubuntu 8.10
-    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
-                                "i486-pc-linux-gnu", "", "", triple);
-    // Ubuntu 9.04
-    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
-                                "i486-linux-gnu","", "", triple);
     // Gentoo amd64 stable
     AddGnuCPlusPlusIncludePaths(
         "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4",

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Chris Lattner

On Feb 16, 2010, at 6:18 AM, Riccardo Magliocchetti wrote:

> Hello again :)
>
> Gonsolo ha scritto:
>>> Since next stable debian will be released with 4.4 i think that the
>>> comment should say squeeze. Then could you please diff the four patches
>>> in one for easier review / test?
>> I donẗ know about Debian, I just did what you suggested. Can you provide a patch?
>
> I just meant to rename "Sid" to "squeeze". Anyway not a big issue, we can remove the debian Sid entry and remove the ubuntu 8.10 entry which is wrong. Ubuntu 8.10 path is the same as 9.04 and debian squeeze / sid for now are the same as 9.10. So attached you can find a patch that consolidates the ubuntu paths.
>
> Since this can lead to some confusion to non debian / ubuntu users we have to make some premises: first we have a link from /usr/include/c++/x.y to /usr/include/c++/x.y.z, then x.y.z may vary during debian testing and unstable development.
>
>> I use git for developing which automatically generates my patches. Isn't it easier to review with modular patches?
>
> You move then delete the same hunk of code in two different patches, that's difficult to follow for me.

Would it be possible to convince you guys to replace this with some code that uses the "last" directory in /usr/include/c++ with readdir?  That way we could stop manually adding new versions.

-Chris


>
> thanks,
> riccardo
>
> Index: lib/Frontend/InitHeaderSearch.cpp
> ===================================================================
> --- lib/Frontend/InitHeaderSearch.cpp (revisione 96342)
> +++ lib/Frontend/InitHeaderSearch.cpp (copia locale)
> @@ -488,18 +488,19 @@
>                                 "x86_64-pc-linux-gnu", "32", "", triple);
>     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.3",
>                                 "i686-pc-linux-gnu", "", "", triple);
> -    // Debian sid
> -    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.2",
> -                                "x86_64-linux-gnu", "32", "", triple);
>     // Ubuntu 7.10 - Gutsy Gibbon
>     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.3",
>                                 "i486-linux-gnu", "", "", triple);
>     // Ubuntu 9.04
> -    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.3",
> +    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
>                                 "x86_64-linux-gnu","32", "", triple);
> +    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
> +                                "i486-linux-gnu","", "", triple);
>     // Ubuntu 9.10
> -    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.1",
> +    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
>                                 "x86_64-linux-gnu", "32", "", triple);
> +    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
> +                                "i486-linux-gnu", "", "", triple);
>     // Fedora 8
>     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.1.2",
>                                 "i386-redhat-linux", "", "", triple);
> @@ -554,12 +555,6 @@
>     AddGnuCPlusPlusIncludePaths(
>       "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4",
>       "i686-pc-linux-gnu", "", "", triple);
> -    // Ubuntu 8.10
> -    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
> -                                "i486-pc-linux-gnu", "", "", triple);
> -    // Ubuntu 9.04
> -    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3",
> -                                "i486-linux-gnu","", "", triple);
>     // Gentoo amd64 stable
>     AddGnuCPlusPlusIncludePaths(
>         "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4",
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

David Chisnall
On 16 Feb 2010, at 17:57, Chris Lattner wrote:

> Would it be possible to convince you guys to replace this with some code that uses the "last" directory in /usr/include/c++ with readdir?  That way we could stop manually adding new versions.


Last time I looked at this code, it had a big FIXME saying it was the wrong approach.  Since nobody else seems to be fixing this, I wonder if I should take a look at refactoring it.  Maybe we should define a fixed location or two to look for a clang_header.conf file that will list standard include locations?  Then distributions just need to provide this file, rather than having special cases for every single file.  Maybe also add an option for overriding this file so that we can easily remove all system includes from the search path for cross-compiling?

If this approach sounds sensible then I'm happy to write the code.  If someone else has a better idea, please let me know what it is...

David

-- Sent from my IBM 1620


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Chris Lattner

On Feb 16, 2010, at 10:07 AM, David Chisnall wrote:

> On 16 Feb 2010, at 17:57, Chris Lattner wrote:
>
>> Would it be possible to convince you guys to replace this with some code that uses the "last" directory in /usr/include/c++ with readdir?  That way we could stop manually adding new versions.
>
>
> Last time I looked at this code, it had a big FIXME saying it was the wrong approach.  Since nobody else seems to be fixing this, I wonder if I should take a look at refactoring it.  Maybe we should define a fixed location or two to look for a clang_header.conf file that will list standard include locations?  Then distributions just need to provide this file, rather than having special cases for every single file.  Maybe also add an option for overriding this file so that we can easily remove all system includes from the search path for cross-compiling?
>
> If this approach sounds sensible then I'm happy to write the code.  If someone else has a better idea, please let me know what it is...

I think the best approach is to make this be a configure option at clang build time.  Second to that, just making the code scan the /usr/include/c++ dir and pick the latest revision available would work.

-Chris
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Rene Rebe
On 16.02.2010, at 19:16, Chris Lattner wrote:

> On Feb 16, 2010, at 10:07 AM, David Chisnall wrote:
>
>> On 16 Feb 2010, at 17:57, Chris Lattner wrote:
>>
>>> Would it be possible to convince you guys to replace this with some code that uses the "last" directory in /usr/include/c++ with readdir?  That way we could stop manually adding new versions.
>>
>>
>> Last time I looked at this code, it had a big FIXME saying it was the wrong approach.  Since nobody else seems to be fixing this, I wonder if I should take a look at refactoring it.  Maybe we should define a fixed location or two to look for a clang_header.conf file that will list standard include locations?  Then distributions just need to provide this file, rather than having special cases for every single file.  Maybe also add an option for overriding this file so that we can easily remove all system includes from the search path for cross-compiling?
>>
>> If this approach sounds sensible then I'm happy to write the code.  If someone else has a better idea, please let me know what it is...
>
> I think the best approach is to make this be a configure option at clang build time.  Second to that, just making the code scan the /usr/include/c++ dir and pick the latest revision available would work.


Heh, in T2 I dynamically patch in the path of the current gcc:

  http://svn.exactcode.de/t2/trunk/package/develop/llvm/llvm.conf

I can implement readdir and possibly a configure option tomorrow.

  René
--
  René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
  http://exactcode.com | http://t2-project.org | http://rene.rebe.name


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu install location fixes

Gonsolo
>> I think the best approach is to make this be a configure option at
>> clang build time.  Second to that, just making the code scan the
>> /usr/include/c++ dir and pick the latest revision available would
>> work.

I found a way to make it a cmake option which defaults to the latest
revision available at compile time (which serves us lazy people who just
want to do a "cd llvm/tools; ln -s ../../clang .; cd ..; mkdir build; cd
build; cmake .."):

cat CMakeLists.txt:

...
FILE( GLOB cppdirs "/usr/include/c++/*" )
list( SORT cppdirs )
list( GET cppdirs -1 CXX_INCLUDE_DIRS)
MESSAGE( STATUS "CXX_INCLUDE_DIRS: ${CXX_INCLUDE_DIRS}" )
...

I am looking forward to implement this for clang. Would this be a
preferred solution?

I also discovered C_INCLUDE_DIRS in the llvm CMakeLists.txt. Should I
add my solution to llvm or clang?

g
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev