CMake detects suspicious compiler

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

CMake detects suspicious compiler

christoph@ruediger.engineering

Hi,

 

I’ve one Linux system here, where cmake always detects a C compiler from a cross-toolchain. Doesn’t sound strange up to now, but the real deal is that the path to the compiler is totally unknown to the shell. It is not in PATH, CC and CXX env variables are empty and CMAKE_C_COMPILER and CMAKE_CXX_COMPILER are not set. The build server is used by multiple users and all but one can use cmake without issues. So I assume that it is some kind of per-user setting.

 

Does anyone have a hint for me where to continue digging?

 

The detected compiler path looks a bit like cmake is automatically pulling a toolchain file, without having any toolchain file specified on the command line. Is there some mechanism for specifying a default toolchain file, i.e. via environment variable or config file?

 

Regards

Christoph

 

--

rüdiger.engineering

Christoph Rüdiger

Düsseldorfer Str. 12

45145 Essen

Germany

 

phone: +49 201 458 478 58


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMake detects suspicious compiler

Don Hinton

On Fri, Jan 26, 2018 at 10:30 AM, [hidden email] <[hidden email]> wrote:

Hi,

 

I’ve one Linux system here, where cmake always detects a C compiler from a cross-toolchain. Doesn’t sound strange up to now, but the real deal is that the path to the compiler is totally unknown to the shell. It is not in PATH, CC and CXX env variables are empty and CMAKE_C_COMPILER and CMAKE_CXX_COMPILER are not set. The build server is used by multiple users and all but one can use cmake without issues. So I assume that it is some kind of per-user setting.

 

Does anyone have a hint for me where to continue digging?

 

The detected compiler path looks a bit like cmake is automatically pulling a toolchain file, without having any toolchain file specified on the command line. Is there some mechanism for specifying a default toolchain file, i.e. via environment variable or config file?

 

Regards

Christoph

 

--

rüdiger.engineering

Christoph Rüdiger

Düsseldorfer Str. 12

45145 Essen

Germany

 

phone: +49 201 458 478 58


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMake detects suspicious compiler

christoph@ruediger.engineering

Sadly, it’s not a cache issue. The behavior survives `hash -h` and exists also in a clean new shell. Any other ideas?

 

Regards

Christoph

 

rüdiger.engineering

Christoph Rüdiger

Düsseldorfer Str. 12

45145 Essen

Germany

 

phone: +49 201 458 478 58

Von: Don Hinton <[hidden email]>
Datum: Freitag, 26. Januar 2018 um 20:48
An: "[hidden email]" <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Betreff: Re: [CMake] CMake detects suspicious compiler

 

 

On Fri, Jan 26, 2018 at 10:30 AM, [hidden email] <[hidden email]> wrote:

Hi,

 

I’ve one Linux system here, where cmake always detects a C compiler from a cross-toolchain. Doesn’t sound strange up to now, but the real deal is that the path to the compiler is totally unknown to the shell. It is not in PATH, CC and CXX env variables are empty and CMAKE_C_COMPILER and CMAKE_CXX_COMPILER are not set. The build server is used by multiple users and all but one can use cmake without issues. So I assume that it is some kind of per-user setting.

 

Does anyone have a hint for me where to continue digging?

 

The detected compiler path looks a bit like cmake is automatically pulling a toolchain file, without having any toolchain file specified on the command line. Is there some mechanism for specifying a default toolchain file, i.e. via environment variable or config file?

 

Regards

Christoph

 

--

rüdiger.engineering

Christoph Rüdiger

Düsseldorfer Str. 12

45145 Essen

Germany

 

phone: +49 201 458 478 58


--

Powered by
www.kitware.com

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
http://cmake.org/cmake/help/support.html
CMake Consulting:
http://cmake.org/cmake/help/consulting.html
CMake Training Courses:
http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

 


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMake detects suspicious compiler

christoph@ruediger.engineering

Oh, sorry. I meant it survives `hash -r`.

 

rüdiger.engineering

Christoph Rüdiger

Düsseldorfer Str. 12

45145 Essen

Germany

 

phone: +49 201 458 478 58

Von: CMake <[hidden email]> im Auftrag von "[hidden email]" <[hidden email]>
Datum: Montag, 29. Januar 2018 um 11:45
An: Don Hinton <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Betreff: Re: [CMake] CMake detects suspicious compiler

 

Sadly, it’s not a cache issue. The behavior survives `hash -h` and exists also in a clean new shell. Any other ideas?

 

Regards

Christoph

 

rüdiger.engineering

Christoph Rüdiger

Düsseldorfer Str. 12

45145 Essen

Germany

 

phone: +49 201 458 478 58

Von: Don Hinton <[hidden email]>
Datum: Freitag, 26. Januar 2018 um 20:48
An: "[hidden email]" <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Betreff: Re: [CMake] CMake detects suspicious compiler

 

 

On Fri, Jan 26, 2018 at 10:30 AM, [hidden email] <[hidden email]> wrote:

Hi,

 

I’ve one Linux system here, where cmake always detects a C compiler from a cross-toolchain. Doesn’t sound strange up to now, but the real deal is that the path to the compiler is totally unknown to the shell. It is not in PATH, CC and CXX env variables are empty and CMAKE_C_COMPILER and CMAKE_CXX_COMPILER are not set. The build server is used by multiple users and all but one can use cmake without issues. So I assume that it is some kind of per-user setting.

 

Does anyone have a hint for me where to continue digging?

 

The detected compiler path looks a bit like cmake is automatically pulling a toolchain file, without having any toolchain file specified on the command line. Is there some mechanism for specifying a default toolchain file, i.e. via environment variable or config file?

 

Regards

Christoph

 

--

rüdiger.engineering

Christoph Rüdiger

Düsseldorfer Str. 12

45145 Essen

Germany

 

phone: +49 201 458 478 58


--

Powered by
www.kitware.com

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
http://cmake.org/cmake/help/support.html
CMake Consulting:
http://cmake.org/cmake/help/consulting.html
CMake Training Courses:
http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

 


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMake detects suspicious compiler

Robert Maynard
Have you tried running with '--trace-expand' with a clean build
directory? I would start by looking for where the execute_process
occurs that verifies the C compiler and work backwards from that
point.

On Mon, Jan 29, 2018 at 5:45 AM, [hidden email]
<[hidden email]> wrote:

> Oh, sorry. I meant it survives `hash -r`.
>
>
>
> rüdiger.engineering
>
> Christoph Rüdiger
>
> Düsseldorfer Str. 12
>
> 45145 Essen
>
> Germany
>
>
>
> phone: +49 201 458 478 58
>
> Von: CMake <[hidden email]> im Auftrag von
> "[hidden email]" <[hidden email]>
> Datum: Montag, 29. Januar 2018 um 11:45
> An: Don Hinton <[hidden email]>
>
>
> Cc: "[hidden email]" <[hidden email]>
> Betreff: Re: [CMake] CMake detects suspicious compiler
>
>
>
> Sadly, it’s not a cache issue. The behavior survives `hash -h` and exists
> also in a clean new shell. Any other ideas?
>
>
>
> Regards
>
> Christoph
>
>
>
> rüdiger.engineering
>
> Christoph Rüdiger
>
> Düsseldorfer Str. 12
>
> 45145 Essen
>
> Germany
>
>
>
> phone: +49 201 458 478 58
>
> Von: Don Hinton <[hidden email]>
> Datum: Freitag, 26. Januar 2018 um 20:48
> An: "[hidden email]" <[hidden email]>
> Cc: "[hidden email]" <[hidden email]>
> Betreff: Re: [CMake] CMake detects suspicious compiler
>
>
>
> Sounds like it might be a shell cache issue.
>
>
>
> https://unix.stackexchange.com/questions/5609/how-do-i-clear-bashs-cache-of-paths-to-executables
>
>
>
>
>
> On Fri, Jan 26, 2018 at 10:30 AM, [hidden email]
> <[hidden email]> wrote:
>
> Hi,
>
>
>
> I’ve one Linux system here, where cmake always detects a C compiler from a
> cross-toolchain. Doesn’t sound strange up to now, but the real deal is that
> the path to the compiler is totally unknown to the shell. It is not in PATH,
> CC and CXX env variables are empty and CMAKE_C_COMPILER and
> CMAKE_CXX_COMPILER are not set. The build server is used by multiple users
> and all but one can use cmake without issues. So I assume that it is some
> kind of per-user setting.
>
>
>
> Does anyone have a hint for me where to continue digging?
>
>
>
> The detected compiler path looks a bit like cmake is automatically pulling a
> toolchain file, without having any toolchain file specified on the command
> line. Is there some mechanism for specifying a default toolchain file, i.e.
> via environment variable or config file?
>
>
>
> Regards
>
> Christoph
>
>
>
> --
>
> rüdiger.engineering
>
> Christoph Rüdiger
>
> Düsseldorfer Str. 12
>
> 45145 Essen
>
> Germany
>
>
>
> phone: +49 201 458 478 58
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake