llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

make/lib_platforms.mk:80: *** 'make/platform/clang_darwin.mk': must define one of 'UniversalArchs' and 'Arch'.

Open riyazvp opened this issue 13 years ago • 8 comments

Bugzilla Link 15316
Resolution WONTFIX
Resolved on Nov 19, 2016 17:30
Version 3.2
OS Linux
CC @compnerd

Extended Description

I was initially getting an error in clang_dwarf.mk about 'no sw_vers' and saw that it is supposedly fixed by r173465 and r173977. Since I am trying to build LLVM/COMPILER-RT/CLANG from Version 3.2 tarball, I manually modified clang_dwarf.mk. The relevant portion of clang_dwarf.mk now looks like:

ifneq ($(shell which sw_vers),) ifneq ($(shell sw_vers -productVersion | grep 10.6),) UniversalArchs.ios := $(filter-out armv7, $(UniversalArchs.ios)) UniversalArchs.cc_kext := $(filter-out armv7, $(UniversalArchs.cc_kext)) UniversalArchs.cc_kext_ios5 := $(filter-out armv7, $(UniversalArchs.cc_kext_ios5)) UniversalArchs.profile_ios := $(filter-out armv7, $(UniversalArchs.profile_ios)) endif endif

The 'no sw_vers' error is now gone but the build still fails with:

make/lib_platforms.mk:80: *** 'make/platform/clang_darwin.mk': must define one of 'UniversalArchs' and 'Arch'. Stop.

What is the fix for this? Why does clang_darwin.mk get included for a Linux x86_64 build?

configure is run with the following options:

--disable-shared --enable-optimized --disable-assertions --enable-targets=x86_64

riyazvp avatar Feb 21 '13 03:02 riyazvp

The makefile based build has been obsoleted by the cmake based build system.

compnerd avatar Nov 20 '16 01:11 compnerd

well, now it dies with some gcc failure. Old error disappered. So, it's make 3.80 bug

llvmbot avatar Nov 12 '13 02:11 llvmbot

I recently downgraded make to 3.80, so it could be a issue.

I'll report if my llvm build successed with 3.82.

llvmbot avatar Nov 11 '13 23:11 llvmbot

I tracked this down to what seems to me to be a bug in 'make' at version 3.80.

The misinterpreted lines are

$$(if $$(or $$(call strneq,UNDEFINED,$$(UniversalArchs)),
$$(call strneq,UNDEFINED,$$(Arch))),,
$$(error '$(1)': must define one of 'UniversalArchs' and 'Arch'))

where the result is not an empty string even if one of $(UniversalArchs) and $(Arch) is set to something else than UNDEFINED.

Upgrading to make 3.82 solved the problem for me.

llvmbot avatar Nov 11 '13 23:11 llvmbot

Problem appears even with 4.7.3-r1

llvmbot avatar Nov 09 '13 00:11 llvmbot

I can confirm with gcc 4.8.1

llvmbot avatar Nov 08 '13 23:11 llvmbot

An additional piece of information. I am using gcc to build LLVM/CLANG.

gcc -v 2>&1 | grep Target: | cut -d' ' -f2

returns:

x86_64-redhat-linux

I come across exactly the same problem, with both Release 3.3 code and the latest code downloaded from the svn trunk.

I can compile the code successfully at home, under ubuntu 13.04 using GCC 4.7.3. But when at office, and I try to compile the code under RHEL AS 4.8,using a self-compiled GCC, version 4.8.1, it always fails.

It has been a long time since this problem is reported. I wonder if anyone has already found a way to fixed this?

llvmbot avatar Aug 27 '13 08:08 llvmbot

An additional piece of information. I am using gcc to build LLVM/CLANG.

gcc -v 2>&1 | grep Target: | cut -d' ' -f2

returns:

x86_64-redhat-linux

riyazvp avatar Feb 22 '13 01:02 riyazvp