Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Weird compilation error (nasm)
Date: Tue, 13 Nov 2018 20:41:01
Message-Id: 20181113203500.5ccero46uouavcqd@grusum.endjinn.de
In Reply to: [gentoo-user] Weird compilation error (nasm) by tuxic@posteo.de
1 Hello,
2
3 On Tue, 13 Nov 2018, tuxic@××××××.de wrote:
4 >I got a weird looking error while upgrading/recompiling nasm:
5 >cmake -C /var/tmp/portage/media-libs/libjpeg-turbo-2.0.1/work/libjpeg-turbo-2.0.1-abi_x86_64.amd64/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_DEFAULT_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.1 -DENABLE_STATIC=no -DWITH_JAVA=no -DWITH_MEM_SRCDST=ON -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-libs/libjpeg-turbo-2.0.1/work/libjpeg-turbo-2.0.1-abi_x86_64.amd64/gentoo_toolchain.cmake /var/tmp/portage/media-libs/libjpeg-turbo-2.0.1/work/libjpeg-turbo-2.0.1
6 >loading initial cache file /var/tmp/portage/media-libs/libjpeg-turbo-2.0.1/work/libjpeg-turbo-2.0.1-abi_x86_64.amd64/gentoo_common_config.cmake
7 > * ACCESS DENIED: fopen_wr: /?
8 >Build type Gentoo
9 >Install path /usr
10 >Compiler flags:
11 >C -march=native -O -pipe
12 >C++
13 >Linker flags:
14 >Executable -Wl,-O1 -Wl,--as-needed
15 >Module -Wl,-O1 -Wl,--as-needed
16 >Shared -Wl,-O1 -Wl,--as-needed
17 >
18 >>>> Source configured.
19 > * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
20 > * LOG FILE: "/var/log/sandbox/sandbox-16492.log"
21 > *
22 >VERSION 1.0
23 >FORMAT: F - Function called
24 >FORMAT: S - Access Status
25 >FORMAT: P - Path as passed to function
26 >FORMAT: A - Absolute Path (not canonical)
27 >FORMAT: R - Canonical Path
28 >FORMAT: C - Command Line
29 >
30 >F: fopen_wr
31 >S: deny
32 >P: /?
33 >A: /?
34 >R: /?
35 >C: /usr/bin/nasm /?
36 > * --------------------------------------------------------------------------------
37
38 The problem is cmake's way to figure out what nasm it has got:
39
40 ==== /usr/share/cmake/Modules/CMakeDetermineASMCompiler.cmake:79 ====
41 list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS MSVC )
42 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?")
43 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft
44 ====
45
46 Workaround1:
47
48 ====
49 --- libjpeg-turbo-2.0.1.ebuild~ 2018-11-13 20:45:58.000000000 +0100
50 +++ libjpeg-turbo-2.0.1.ebuild 2018-11-13 20:44:02.000000000 +0100
51 @@ -52,6 +52,7 @@
52 -DENABLE_STATIC="$(usex static-libs)"
53 -DWITH_JAVA="$(multilib_native_usex java)"
54 -DWITH_MEM_SRCDST=ON
55 + -DCMAKE_ASM_NASM_COMPILER_ID=GNU
56 )
57 [[ ${ABI} == "x32" ]] && mycmakeargs+=( -DREQUIRE_SIMD=OFF ) #420239
58 cmake-utils_src_configure
59 ====
60
61 Workaround2: if you have dev-lang/yasm installed, use:
62
63 ASM_NASM=/usr/bin/yasm [ebuild|emerge] ...
64
65 Workaround3: delete those MSVC lines from
66 /usr/share/cmake/Modules/CMakeDetermineASMCompiler.cmake
67
68 Workaround4: patch cmake-utils.eclass to add
69 -DCMAKE_ASM_NASM_COMPILER_ID=GNU to cmakeargs in
70 cmake-utils_src_configure.
71
72 HTH,
73 -dnh, I'd prefer solution 3 ;)
74
75 --
76 my other signature is more intellectual

Replies

Subject Author
Re: [gentoo-user] Weird compilation error (nasm) tuxic@××××××.de