public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Haller <gentoo@dhaller.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Weird compilation error (nasm)
Date: Tue, 13 Nov 2018 21:35:00 +0100	[thread overview]
Message-ID: <20181113203500.5ccero46uouavcqd@grusum.endjinn.de> (raw)
In-Reply-To: <20181113171138.rwe43lsliihyhh7s@solfire>

Hello,

On Tue, 13 Nov 2018, tuxic@posteo.de wrote:
>I got a weird looking error while upgrading/recompiling nasm:
>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
>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
> * ACCESS DENIED:  fopen_wr:     /?
>Build type      Gentoo
>Install path    /usr
>Compiler flags:
>C               -march=native -O -pipe
>C++             
>Linker flags:
>Executable      -Wl,-O1 -Wl,--as-needed
>Module          -Wl,-O1 -Wl,--as-needed
>Shared          -Wl,-O1 -Wl,--as-needed
>
>>>> Source configured.
> * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
> * LOG FILE: "/var/log/sandbox/sandbox-16492.log"
> * 
>VERSION 1.0
>FORMAT: F - Function called
>FORMAT: S - Access Status
>FORMAT: P - Path as passed to function
>FORMAT: A - Absolute Path (not canonical)
>FORMAT: R - Canonical Path
>FORMAT: C - Command Line
>
>F: fopen_wr
>S: deny
>P: /?
>A: /?
>R: /?
>C: /usr/bin/nasm /? 
> * --------------------------------------------------------------------------------

The problem is cmake's way to figure out what nasm it has got:

==== /usr/share/cmake/Modules/CMakeDetermineASMCompiler.cmake:79 ====
  list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS MSVC )
  set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?")
  set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft
====

Workaround1:

====
--- libjpeg-turbo-2.0.1.ebuild~ 2018-11-13 20:45:58.000000000 +0100
+++ libjpeg-turbo-2.0.1.ebuild  2018-11-13 20:44:02.000000000 +0100
@@ -52,6 +52,7 @@
                -DENABLE_STATIC="$(usex static-libs)"
                -DWITH_JAVA="$(multilib_native_usex java)"
                -DWITH_MEM_SRCDST=ON
+               -DCMAKE_ASM_NASM_COMPILER_ID=GNU
        )
        [[ ${ABI} == "x32" ]] && mycmakeargs+=( -DREQUIRE_SIMD=OFF ) #420239
        cmake-utils_src_configure
====

Workaround2: if you have dev-lang/yasm installed, use:

ASM_NASM=/usr/bin/yasm [ebuild|emerge] ...

Workaround3: delete those MSVC lines from
/usr/share/cmake/Modules/CMakeDetermineASMCompiler.cmake

Workaround4: patch cmake-utils.eclass to add 
-DCMAKE_ASM_NASM_COMPILER_ID=GNU to cmakeargs in
cmake-utils_src_configure.

HTH,
-dnh, I'd prefer solution 3 ;)

-- 
my other signature is more intellectual


  parent reply	other threads:[~2018-11-13 20:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 17:11 [gentoo-user] Weird compilation error (nasm) tuxic
2018-11-13 17:52 ` Alexander Kapshuk
2018-11-13 17:58   ` tuxic
2018-11-13 18:12     ` Alexander Kapshuk
2018-11-13 18:11 ` Jack
2018-11-13 20:35 ` David Haller [this message]
2018-11-14 19:22   ` tuxic
2018-11-14 22:05     ` Adam Carter
2018-11-14 22:21 ` Sergei Trofimovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181113203500.5ccero46uouavcqd@grusum.endjinn.de \
    --to=gentoo@dhaller.de \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox