Bug 219417 - graphics/mesa-dri: fails to build with elfutils installed
Summary: graphics/mesa-dri: fails to build with elfutils installed
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-20 13:06 UTC by Ting-Wei Lan
Modified: 2018-06-04 15:52 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ting-Wei Lan 2017-05-20 13:06:41 UTC
devel/elfutils port installs some header files and shared libraries that have the same names as the base system, causing compilation error when building graphics/mesa-dri port.

gmake  all-am
gmake[5]: Entering directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.0.4/src/amd'
/bin/sh ../../libtool  --tag=CC   --mode=compile cc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"17.0.4\" -DPACKAGE_STRING=\"Mesa\ 17.0.4\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"17.0.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1 -DHAVE_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_FUNC_ATTRIBUTE_ALIAS=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -I.   -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_DRI3 -DENABLE_SHADER_CACHE -DHAVE_MINCORE -DHAVE_LLVM=0x0400 -DMESA_LLVM_VERSION_PATCH=1 -I../../include -I../../src -I../../src -I../../src/amd/common -I../../src/amd/common -I../../src/compiler -I../../src/compiler/nir -I../../src/compiler -I../../src/mapi -I../../src/mesa -I../../src/mesa/drivers/dri/common -I../../src/gallium/auxiliary -I../../src/gallium/include -isystem /usr/local/include -fvisibility=hidden -D_THREAD_SAFE -pthread -I/usr/local/llvm40/include   -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS  -O2 -pipe -march=sandybridge  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-math-errno -fno-trapping-math -Qunused-arguments  -MT common/common_libamd_common_la-ac_binary.lo -MD -MP -MF common/.deps/common_libamd_common_la-ac_binary.Tpo -c -o common/common_libamd_common_la-ac_binary.lo `test -f 'common/ac_binary.c' || echo './'`common/ac_binary.c
libtool: compile:  cc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"17.0.4\" "-DPACKAGE_STRING=\"Mesa 17.0.4\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"17.0.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1 -DHAVE_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_FUNC_ATTRIBUTE_ALIAS=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -I. -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_DRI3 -DENABLE_SHADER_CACHE -DHAVE_MINCORE -DHAVE_LLVM=0x0400 -DMESA_LLVM_VERSION_PATCH=1 -I../../include -I../../src -I../../src -I../../src/amd/common -I../../src/amd/common -I../../src/compiler -I../../src/compiler/nir -I../../src/compiler -I../../src/mapi -I../../src/mesa -I../../src/mesa/drivers/dri/common -I../../src/gallium/auxiliary -I../../src/gallium/include -isystem /usr/local/include -fvisibility=hidden -D_THREAD_SAFE -pthread -I/usr/local/llvm40/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O2 -pipe -march=sandybridge -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-math-errno -fno-trapping-math -Qunused-arguments -MT common/common_libamd_common_la-ac_binary.lo -MD -MP -MF common/.deps/common_libamd_common_la-ac_binary.Tpo -c common/ac_binary.c  -fPIC -DPIC -o common/.libs/common_libamd_common_la-ac_binary.o
In file included from common/ac_binary.c:33:
In file included from /usr/local/include/gelf.h:32:
/usr/local/include/libelf.h:308:8: error: unknown type name 'Elf32_Chdr'
extern Elf32_Chdr *elf32_getchdr (Elf_Scn *__scn);
       ^
/usr/local/include/libelf.h:309:8: error: unknown type name 'Elf64_Chdr'
extern Elf64_Chdr *elf64_getchdr (Elf_Scn *__scn);
       ^
In file included from common/ac_binary.c:33:
/usr/local/include/gelf.h:93:9: error: unknown type name 'Elf64_Chdr'
typedef Elf64_Chdr GElf_Chdr;
        ^
3 errors generated.
gmake[5]: *** [Makefile:858: common/common_libamd_common_la-ac_binary.lo] Error 1
gmake[5]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.0.4/src/amd'
gmake[4]: *** [Makefile:700: all] Error 2
gmake[4]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.0.4/src/amd'
gmake[3]: *** [Makefile:859: all-recursive] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.0.4/src'
gmake[2]: *** [Makefile:650: all] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.0.4/src'
gmake[1]: *** [Makefile:647: all-recursive] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.0.4'
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/mesa-dri
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2017-05-20 14:04:17 UTC
This issue was fixed on CURRENT in r312599.  What branch are you on?
Comment 2 Ting-Wei Lan 2017-05-20 17:47:57 UTC
(In reply to Conrad Meyer from comment #1)
I use 11.0-RELEASE-p10. This system is updated with freebsd-update.
Comment 3 Conrad Meyer freebsd_committer freebsd_triage 2017-05-20 18:16:07 UTC
I recommend someone MFC r312599.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-05-27 01:36:24 UTC
A commit references this bug:

Author: emaste
Date: Sat May 27 01:35:59 UTC 2017
New revision: 318972
URL: https://svnweb.freebsd.org/changeset/base/318972

Log:
  MFC r312599 (cem): Add remaining ELF compression definitions and structs

  PR:		219417

Changes:
_U  stable/11/
  stable/11/sys/sys/elf32.h
  stable/11/sys/sys/elf64.h
  stable/11/sys/sys/elf_common.h
Comment 5 Ting-Wei Lan 2017-06-05 06:34:37 UTC
Thanks, I installed 11-STABLE in a chroot and confirmed that mesa-dri could be built with elfutils.
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:46:53 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 7 Ting-Wei Lan 2018-06-04 15:52:37 UTC
I confirmed that it has been fixed on FreeBSD 11.2-RC1, so I am closing this bug now.