Open Bug 919154 Opened 7 years ago Updated 6 years ago

js/src/jsapi.h:1051:8: error: visibility does not match previous declaration

Categories

(Core :: JavaScript Engine, defect, major)

x86_64
Linux
defect
Not set
major

Tracking

()

People

(Reporter: decoder, Unassigned)

References

(Blocks 1 open bug)

Details

I'm hitting the following error with Clang r191092 on mozilla-inbound:


json.o
In file included from /home/decoder/Mozilla/repos/mozilla-inbound/js/src/jsnum.cpp:30:
/home/decoder/Mozilla/repos/mozilla-inbound/js/src/jsapi.h:1051:8: error: visibility does not match previous declaration
extern JS_PUBLIC_API(bool)
       ^
/home/decoder/Mozilla/repos/mozilla-inbound/js/src/jstypes.h:73:30: note: expanded from macro 'JS_PUBLIC_API'
#  define JS_PUBLIC_API(t)   MOZ_EXPORT t
                             ^
./../../dist/include/mozilla/Types.h:44:45: note: expanded from macro 'MOZ_EXPORT'
#    define MOZ_EXPORT       __attribute__((visibility("default")))
                                            ^
/home/decoder/Mozilla/repos/mozilla-inbound/js/src/config/gcc_hidden.h:6:13: note: previous attribute is here
#pragma GCC visibility push(hidden)
            ^
/home/decoder/Mozilla/repos/mozilla-inbound/js/src/jsnum.cpp:1631:1: error: visibility does not match previous declaration
JS_PUBLIC_API(bool)
^
/home/decoder/Mozilla/repos/mozilla-inbound/js/src/jstypes.h:73:30: note: expanded from macro 'JS_PUBLIC_API'
#  define JS_PUBLIC_API(t)   MOZ_EXPORT t
                             ^
./../../dist/include/mozilla/Types.h:44:45: note: expanded from macro 'MOZ_EXPORT'
#    define MOZ_EXPORT       __attribute__((visibility("default")))
                                            ^
/home/decoder/Mozilla/repos/mozilla-inbound/js/src/config/gcc_hidden.h:6:13: note: previous attribute is here
#pragma GCC visibility push(hidden)
            ^
2 errors generated.

In the directory  /home/decoder/Mozilla/repos/mozilla-inbound/obj-x86_64-unknown-linux-gnu/js/src
The following command failed to execute properly:
/home/decoder/Mozilla/repos/mozilla-inbound/clang/bin/clang++ -o jsnum.o -c -I./../../dist/system_wrappers_js -include /home/decoder/Mozilla/repos/mozilla-inbound/js/src/config/gcc_hidden.h -DENABLE_PARALLEL_JS -DENABLE_BINARYDATA -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX="lib" -DDLL_SUFFIX=".so" -DUSE_ZLIB -Ictypes/libffi/include -I/home/decoder/Mozilla/repos/mozilla-inbound/js/src/../../mfbt/double-conversion -I/home/decoder/Mozilla/repos/mozilla-inbound/js/src/../../intl/icu/source/common -I/home/decoder/Mozilla/repos/mozilla-inbound/js/src/../../intl/icu/source/i18n -I/home/decoder/Mozilla/repos/mozilla-inbound/js/src -I. -I./../../dist/include -I/home/decoder/Mozilla/repos/mozilla-inbound/obj-x86_64-unknown-linux-gnu/dist/include/nspr -I/home/decoder/Mozilla/repos/mozilla-inbound/js/src -fPIC -Qunused-arguments -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MP -MF .deps/jsnum.o.pp -Qunused-arguments -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null -Wsign-compare -Wno-invalid-offsetof -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags -fsanitize=address -Dxmalloc=myxmalloc -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -g -O2 -g -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 /home/decoder/Mozilla/repos/mozilla-inbound/js/src/jsnum.cpp
make[4]: *** [jsnum.o] Error 1
make[4]: *** Waiting for unfinished jobs....
4 warnings generated.
make[3]: *** [libs] Error 2
make[2]: *** [default] Error 2
make[1]: *** [realbuild] Error 2
make: *** [build] Error 2
117 compiler warnings present. 


I think we've had these visibility issues before, I just don't understand enough about them to fix it.
Well, this does look like a clang bug
(In reply to Mike Hommey [:glandium] from comment #1)
> Well, this does look like a clang bug

because in both cases the visibility is defined as the same.
Actually, this could be bug 912959, but jsnum.h doesn't appear in the error messages.
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.