Hello from a newcomer! + Bug 26834

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Hello from a newcomer! + Bug 26834

Jacob Carlborg via cfe-dev
Hello everyone,

a quick intro: I'm planning to participate in Google Summer of Code this year as a student, and I'm really interested in the llvm project in general and clang in particular. To increase my chances of getting accepted and to get a better understanding of the project and its code base, I'm currently working on fixing some open bugs.

I started working on bug #26834 (as suggested by Vassil Vassilev), and i have a couple of questions. I hope this is the right place to ask. I'm still new to the project, so please bear with me as my questions might be silly.
So regarding bug #26834: I've figured that the reason the right headers aren't being added is because every candidate gcc installation is scanned for Multilibs, and if they aren't detected, then the gcc installation is ignored. Now I'm not sure which one is the right behavior, i.e. is the check for Multilibs necessary ( https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChains.cpp#L2798 )?
 
Thanks!

--
Regards,
Kinan.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hello from a newcomer! + Bug 26834

Jacob Carlborg via cfe-dev
On 02/03/17 12:58, [hidden email] via cfe-dev wrote:
Hello everyone,

a quick intro: I'm planning to participate in Google Summer of Code this year as a student, and I'm really interested in the llvm project in general and clang in particular. To increase my chances of getting accepted and to get a better understanding of the project and its code base, I'm currently working on fixing some open bugs.

I started working on bug #26834 (as suggested by Vassil Vassilev), and i have a couple of questions. I hope this is the right place to ask. I'm still new to the project, so please bear with me as my questions might be silly.
So regarding bug #26834: I've figured that the reason the right headers aren't being added is because every candidate gcc installation is scanned for Multilibs, and if they aren't detected, then the gcc installation is ignored. Now I'm not sure which one is the right behavior, i.e. is the check for Multilibs necessary ( https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChains.cpp#L2798 )?
Maybe you can ping the person who worked in that area (git blame should tell you).

If you know how to fix the issue, fix it, run the test suite and if all is green submit a patch for review at: http://reviews.llvm.org/ adding as reviewers the people worked in that area.

-- Vassil
 
Thanks!

--
Regards,
Kinan.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hello from a newcomer! + Bug 26834

Jacob Carlborg via cfe-dev


On 3/7/17 6:32 AM, Vassil Vassilev via cfe-dev wrote:

> On 02/03/17 12:58, [hidden email] via cfe-dev wrote:
>> Hello everyone,
>>
>> a quick intro: I'm planning to participate in Google Summer of Code
>> this year as a student, and I'm really interested in the llvm project
>> in general and clang in particular. To increase my chances of getting
>> accepted and to get a better understanding of the project and its code
>> base, I'm currently working on fixing some open bugs.
>>
>> I started working on bug #26834 (as suggested by Vassil Vassilev), and
>> i have a couple of questions. I hope this is the right place to ask.
>> I'm still new to the project, so please bear with me as my questions
>> might be silly.
>> So regarding bug #26834: I've figured that the reason the right
>> headers aren't being added is because every candidate gcc installation
>> is scanned for Multilibs, and if they aren't detected, then the gcc
>> installation is ignored. Now I'm not sure which one is the right
>> behavior, i.e. is the check for Multilibs necessary
>> ( https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChains.cpp#L2798
>> )?
> Maybe you can ping the person who worked in that area (git blame should
> tell you).
>
> If you know how to fix the issue, fix it, run the test suite and if all
> is green submit a patch for review at: http://reviews.llvm.org/ adding
> as reviewers the people worked in that area.

Feel free to add me as a reviewer.

I suspect the bug is that clang calls the target triple:
"x86_64-unknown-linux-gnu" and gcc calls it: "x86_64-linux-gnu", and
thus doesn't find the toolchain there.

Maybe for ".*-none-.*-.*" and ".*-unknown-.*-.*" triples we ought to
search the corresponding ".*-.*-.*" directories?

The output from '-v' ought to tell you about which candidate gcc
installations/multilibs it found, if everything is working correctly.


Cheers,

Jon Roelofs

>
> -- Vassil
>>
>> Thanks!
>>
>> --
>> Regards,
>> Kinan.
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> [hidden email]
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>

--
Jon Roelofs
[hidden email]
CodeSourcery / Mentor Embedded
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hello from a newcomer! + Bug 26834

Jacob Carlborg via cfe-dev
It does find the toolchain in the directory given by the sysroot flag, and lists it as a candidate GCC Installation. The problem is it also checks for the existence of crtbegin.o in the corresponding lib directory (and considers the installation invalid when crtbegin.o is not present), which clearly isn't required when only doing syntax checking. As I see it, one way to fix this is to make the GCC installation detector aware of the compilation mode (or final phase), but I'm not sure whether this kind of dependency is good. Any ideas? 

On Tue, Mar 7, 2017 at 6:10 PM, Jonathan Roelofs <[hidden email]> wrote:


On 3/7/17 6:32 AM, Vassil Vassilev via cfe-dev wrote:
On 02/03/17 12:58, [hidden email] via cfe-dev wrote:
Hello everyone,

a quick intro: I'm planning to participate in Google Summer of Code
this year as a student, and I'm really interested in the llvm project
in general and clang in particular. To increase my chances of getting
accepted and to get a better understanding of the project and its code
base, I'm currently working on fixing some open bugs.

I started working on bug #26834 (as suggested by Vassil Vassilev), and
i have a couple of questions. I hope this is the right place to ask.
I'm still new to the project, so please bear with me as my questions
might be silly.
So regarding bug #26834: I've figured that the reason the right
headers aren't being added is because every candidate gcc installation
is scanned for Multilibs, and if they aren't detected, then the gcc
installation is ignored. Now I'm not sure which one is the right
behavior, i.e. is the check for Multilibs necessary
( https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChains.cpp#L2798
)?
Maybe you can ping the person who worked in that area (git blame should
tell you).

If you know how to fix the issue, fix it, run the test suite and if all
is green submit a patch for review at: http://reviews.llvm.org/ adding
as reviewers the people worked in that area.

Feel free to add me as a reviewer.

I suspect the bug is that clang calls the target triple: "x86_64-unknown-linux-gnu" and gcc calls it: "x86_64-linux-gnu", and thus doesn't find the toolchain there.

Maybe for ".*-none-.*-.*" and ".*-unknown-.*-.*" triples we ought to search the corresponding ".*-.*-.*" directories?

The output from '-v' ought to tell you about which candidate gcc installations/multilibs it found, if everything is working correctly.


Cheers,

Jon Roelofs



-- Vassil

Thanks!

--
Regards,
Kinan.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


--
Jon Roelofs
[hidden email]
CodeSourcery / Mentor Embedded



--
Regards,
Kinan.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hello from a newcomer! + Bug 26834

Jacob Carlborg via cfe-dev
In reply to this post by Jacob Carlborg via cfe-dev
It isn't present because to reproduce the bug, we only copy the included header files:
$ clang -Xclang -header-include-file -Xclang included_files.txt -fsyntax-only T.cpp && sed -i '/<command line>/d' included_files.txt

$ cat included_files.txt | xargs -I$ cp --parents $ includes/
$ clang++ -fsyntax-only --sysroot="./includes/" T.cpp -v
What's the idea behind checking for crtbegin.o specifically?

On Thu, Mar 9, 2017 at 6:30 PM, Jonathan Roelofs <[hidden email]> wrote:



On 3/8/17 1:36 PM, [hidden email] wrote:
It does find the toolchain in the directory given by the sysroot flag, and lists it as a candidate GCC Installation. The problem is it also checks for the existence of crtbegin.o in the corresponding lib directory (and considers the installation invalid when crtbegin.o is not present),

Why isn't it present?

which clearly isn't required when only doing syntax checking.
As I see it, one way to fix this is to make the GCC installation detector aware of the compilation mode (or final phase), but I'm not sure whether this kind of dependency is good. Any ideas?

Specializing this check so that it only looks for crtbegin.o when it absolutely needs it seems like a bad idea to me: you'll have very complicated logic to compute all the possible sets of driver options where it wouldn't be used.


Jon


On Tue, Mar 7, 2017 at 6:10 PM, Jonathan Roelofs <[hidden email]> wrote:


On 3/7/17 6:32 AM, Vassil Vassilev via cfe-dev wrote:
On 02/03/17 12:58, [hidden email] via cfe-dev wrote:
Hello everyone,

a quick intro: I'm planning to participate in Google Summer of Code
this year as a student, and I'm really interested in the llvm project
in general and clang in particular. To increase my chances of getting
accepted and to get a better understanding of the project and its code
base, I'm currently working on fixing some open bugs.

I started working on bug #26834 (as suggested by Vassil Vassilev), and
i have a couple of questions. I hope this is the right place to ask.
I'm still new to the project, so please bear with me as my questions
might be silly.
So regarding bug #26834: I've figured that the reason the right
headers aren't being added is because every candidate gcc installation
is scanned for Multilibs, and if they aren't detected, then the gcc
installation is ignored. Now I'm not sure which one is the right
behavior, i.e. is the check for Multilibs necessary
( https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChains.cpp#L2798
)?
Maybe you can ping the person who worked in that area (git blame should
tell you).

If you know how to fix the issue, fix it, run the test suite and if all
is green submit a patch for review at: http://reviews.llvm.org/ adding
as reviewers the people worked in that area.

Feel free to add me as a reviewer.

I suspect the bug is that clang calls the target triple: "x86_64-unknown-linux-gnu" and gcc calls it: "x86_64-linux-gnu", and thus doesn't find the toolchain there.

Maybe for ".*-none-.*-.*" and ".*-unknown-.*-.*" triples we ought to search the corresponding ".*-.*-.*" directories?

The output from '-v' ought to tell you about which candidate gcc installations/multilibs it found, if everything is working correctly.


Cheers,

Jon Roelofs



-- Vassil

Thanks!

--
Regards,
Kinan.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


--
Jon Roelofs
[hidden email]
CodeSourcery / Mentor Embedded



--
Regards,
Kinan.

-- 
Jon Roelofs
[hidden email]
CodeSourcery / Mentor Embedded



--
Regards,
Kinan.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...