Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679330 - dev-lang/spidermonkey-1.8.5-r6 - ./methodjit/MethodJIT.cpp:192:5: error: expected '(' before 'volatile'
Summary: dev-lang/spidermonkey-1.8.5-r6 - ./methodjit/MethodJIT.cpp:192:5: error: expe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 686744 (view as bug list)
Depends on: 687072
Blocks:
  Show dependency tree
 
Reported: 2019-03-03 14:18 UTC by Francesco Turco
Modified: 2019-06-07 10:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
info.txt (info.txt,6.21 KB, text/plain)
2019-03-03 14:18 UTC, Francesco Turco
Details
build.log.xz (build.log.xz,19.94 KB, application/x-xz)
2019-03-03 14:20 UTC, Francesco Turco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Turco 2019-03-03 14:18:03 UTC
I can't build dev-lang/spidermonkey-1.8.5-r6 anymore after switching to GCC 8.3.0:

### BEGIN ERROR MESSAGE ###

./methodjit/MethodJIT.cpp: At global scope:
./methodjit/MethodJIT.cpp:192:5: error: expected '(' before 'volatile'
 asm volatile (
     ^~~~~~~~
     (
./methodjit/MethodJIT.cpp:193:1: error: expected unqualified-id before string constant
 ".text\n"
 ^~~~~~~~~
./methodjit/MethodJIT.cpp:192:15: error: expected ')' before string constant
 asm volatile (
              ~^
               )
 ".text\n"
 ~~~~~~~~~      
./methodjit/MethodJIT.cpp:239:5: error: expected '(' before 'volatile'
 asm volatile (
     ^~~~~~~~
     (
./methodjit/MethodJIT.cpp:240:1: error: expected unqualified-id before string constant
 ".text\n"
 ^~~~~~~~~
./methodjit/MethodJIT.cpp:239:15: error: expected ')' before string constant
 asm volatile (
              ~^
               )
 ".text\n"
 ~~~~~~~~~      
./methodjit/MethodJIT.cpp:259:5: error: expected '(' before 'volatile'
 asm volatile (
     ^~~~~~~~
     (
./methodjit/MethodJIT.cpp:260:1: error: expected unqualified-id before string constant
 ".text\n"
 ^~~~~~~~~
./methodjit/MethodJIT.cpp:259:15: error: expected ')' before string constant
 asm volatile (
              ~^
               )
 ".text\n"
 ~~~~~~~~~      
./methodjit/MethodJIT.cpp:284:5: error: expected '(' before 'volatile'
 asm volatile (
     ^~~~~~~~
     (
./methodjit/MethodJIT.cpp:285:1: error: expected unqualified-id before string constant
 ".text\n"
 ^~~~~~~~~
./methodjit/MethodJIT.cpp:284:15: error: expected ')' before string constant
 asm volatile (
              ~^
               )
 ".text\n"
 ~~~~~~~~~      
In file included from ./jsval.h:48,
                 from ./jspubtd.h:47,
                 from ./jsprvtd.h:57,
                 from ./jscntxt.h:55,
                 from ./methodjit/MethodJIT.h:42,
                 from ./methodjit/MethodJIT.cpp:39:
./jsutil.h: In instantiation of 'void js::PodZero(T*) [with T = js::analyze::Bytecode]':
./jsanalyze.h:87:21:   required from here
./jsutil.h:422:11: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct js::analyze::Bytecode'; use assignment or value-initialization instead [-Wclass-memaccess]
     memset(t, 0, sizeof(T));
     ~~~~~~^~~~~~~~~~~~~~~~~
In file included from ./methodjit/Compiler.h:43,
                 from ./methodjit/MethodJIT.cpp:44:
./jsanalyze.h:56:8: note: 'struct js::analyze::Bytecode' declared here
 struct Bytecode
        ^~~~~~~~
make[1]: *** [config/rules.mk:1477: MethodJIT.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-lang/spidermonkey-1.8.5-r6/work/js-1.8.5/js/src'
make: *** [config/rules.mk:754: default] Error 2

### END ERROR MESSAGE ###

# emerge -pv =spidermonkey-1.8.5-r6

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-lang/spidermonkey-1.8.5-r6:0/mozjs185::gentoo  USE="-debug -minimal -static-libs -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 1 Francesco Turco 2019-03-03 14:18:43 UTC
Created attachment 567618 [details]
info.txt

emerge --info
Comment 2 Francesco Turco 2019-03-03 14:20:13 UTC
Created attachment 567620 [details]
build.log.xz

MAKEOPTS="-j1" emerge -av1 =spidermonkey-1.8.5-r6
Comment 3 Torsten Kurbad 2019-03-03 23:14:05 UTC
I've got the same problem.
Comment 4 Sergei Trofimovich gentoo-dev 2019-03-05 08:59:11 UTC
It's a compiler change:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89585

In g++-9 toplevel 'asm volatile' will be a syntax error (C compiler always rejected it). It was accidentally backported into gcc-8.3.0. But it makes sense to adapt to g++-9 now and remove 'volatile'.
Comment 5 Sergei Trofimovich gentoo-dev 2019-03-05 09:43:56 UTC
Also created https://wiki.gentoo.org/wiki/Gcc_9_porting_notes/asm_volatile
Comment 6 Larry the Git Cow gentoo-dev 2019-03-07 19:05:54 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5efe59e2c6c11b669bf33441134d2f4a8ba9741

commit f5efe59e2c6c11b669bf33441134d2f4a8ba9741
Author:     Ian Stakenvicius <axs@gentoo.org>
AuthorDate: 2019-03-07 19:05:21 +0000
Commit:     Ian Stakenvicius <axs@gentoo.org>
CommitDate: 2019-03-07 19:05:45 +0000

    dev-lang/spidermonkey: drop top-level 'asm volatile' on 1.8.5
    
    Required to build using gcc-8 and above.  Also bumped to EAPI6 while in there.
    
    Bug: https://bugs.gentoo.org/679330
    Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-lang/spidermonkey/Manifest                     |   1 +
 dev-lang/spidermonkey/spidermonkey-1.8.5-r7.ebuild | 147 +++++++++++++++++++++
 2 files changed, 148 insertions(+)
Comment 7 Ian Stakenvicius gentoo-dev 2019-03-07 19:53:51 UTC
Please test 1.8.5-r7 , if all is well I'll close the bug and stablereq it.
Comment 8 Francesco Turco 2019-04-02 17:42:37 UTC
I just successfully emerged dev-lang/spidermonkey-1.8.5-r7 with gcc-8.3.0.
Thank you for having fixed this bug!
Comment 9 Thomas Beutin 2019-05-10 09:51:27 UTC
(In reply to Francesco Turco from comment #8)
> I just successfully emerged dev-lang/spidermonkey-1.8.5-r7 with gcc-8.3.0.
> Thank you for having fixed this bug!

for me it works as well - thank you!
Comment 10 Jory A. Pratt gentoo-dev 2019-05-31 13:27:28 UTC
*** Bug 686744 has been marked as a duplicate of this bug. ***
Comment 11 Tom 2019-06-07 08:25:41 UTC
-r7 compiles fine - THX :)