question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[package] m4/1.4.18: Does not compile with Clang

See original GitHub issue

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: m4/1.4.18
  • Operating System+version: Linux Ubuntu 20.04
  • Compiler+version: Clang 10
  • Conan version: conan 1.26.1
  • Python version: Python 3.8.2

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

$ conan profile show clang
Configuration for profile clang:

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=clang
compiler.version=10
compiler.libcxx=libstdc++11
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

$ conan install m4/1.4.18@_/_ -pr clang -b missing

Logs (Include/Attach if Applicable)

$ conan install m4/1.4.18@_/_ -pr clang -b missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

m4/1.4.18: WARN: Package is corrupted, removing folder: /home/wouter/.conan/data/m4/1.4.18/_/_/package/91a4ede3f059ef52815958df6195330b87cd719c
Installing package: m4/1.4.18
Requirements
    m4/1.4.18 from 'conan-center' - Cache
Packages
    m4/1.4.18:91a4ede3f059ef52815958df6195330b87cd719c - Build

Installing (downloading, building) binaries...
m4/1.4.18: WARN: Build folder is dirty, removing it: /home/wouter/.conan/data/m4/1.4.18/_/_/build/91a4ede3f059ef52815958df6195330b87cd719c
m4/1.4.18: Copying sources to build folder
m4/1.4.18: Building your package in /home/wouter/.conan/data/m4/1.4.18/_/_/build/91a4ede3f059ef52815958df6195330b87cd719c
m4/1.4.18: Generator txt created conanbuildinfo.txt
m4/1.4.18: Calling build()
m4/1.4.18: Calling:
 > source_subfolder/configure '--prefix=/home/wouter/.conan/data/m4/1.4.18/_/_/package/91a4ede3f059ef52815958df6195330b87cd719c' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/wouter/.conan/data/m4/1.4.18/_/_/build/91a4ede3f059ef52815958df6195330b87cd719c':
configure: error: C compiler cannot create executables
See `config.log' for more details
m4/1.4.18: 
m4/1.4.18: ERROR: Package '91a4ede3f059ef52815958df6195330b87cd719c' build failed
m4/1.4.18: WARN: Build folder /home/wouter/.conan/data/m4/1.4.18/_/_/build/91a4ede3f059ef52815958df6195330b87cd719c
ERROR: m4/1.4.18: Error in build() method, line 75
	autotools = self._configure_autotools()
while calling '_configure_autotools', line 42
	self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder)
	ConanException: Error 77 while executing source_subfolder/configure '--prefix=/home/wouter/.conan/data/m4/1.4.18/_/_/package/91a4ede3f059ef52815958df6195330b87cd719c' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
madebrcommented, Jun 29, 2020

From what I understand: The settings sections is used to populate the settings object. But the build helpers won’t automagically find/use the correct build toolchain. e.g. for cross building the gcc compiler might have a aarch64-linux-gnu- prefix. So you can set CC=aarch64-linux-gnu-gcc in the env section.

0reactions
steakhalcommented, Dec 28, 2020

Please remove the CC_FOR_BUILD= from your profile and try #4003

Seems to work for me with both gcc-10 and clang-10 this way. Thank you for your effort.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cross-compilation using Clang
Introduction¶. This document will guide you in choosing the right Clang options for cross-compiling your code to a different architecture.
Read more >
Alternate Compiler for Installing R Packages: clang: error
This is caused because R 3.4.0 is compiled by CRAN with llvm-4.0.0 (which supports OpenMP), but Apple's fork (installed by default on macOS)...
Read more >
Clang - Gentoo Wiki
Clang is a "LLVM native" C/C++/Objective-C compiler using LLVM as a backend and optimizer. It aims to be GCC compatible yet stricter, ...
Read more >
Building the Clang + LLVM compilers - The University of Utah
However, when the package build requires nondefault compilers, ... We are not quite done yet, because the default build of Clang + LLVM...
Read more >
CoGAPS Installation Problem - clang compiler does not support
Is there any way to change the clang version used when compiling CoGAPS? Thanks! Old packages: 'CoGAPS' Update all/some/none?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found