codegooglecom / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

[PATCH]libproxy 0.2.3 fail to compile with mozjs support #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure --with-mozjs
2. make

What is the expected output? What do you see instead?

mozjs.c:32:19: error: jsapi.h: No such file or directory
mozjs.c:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'dnsResolve'
mozjs.c:70: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'myIpAddress'
mozjs.c:83: error: expected specifier-qualifier-list before 'JSRuntime'
mozjs.c: In function 'ctxs_free':
mozjs.c:92: error: 'ctxStore' has no member named 'ctx'
mozjs.c:92: warning: implicit declaration of function 'JS_DestroyContext'
mozjs.c:92: error: 'ctxStore' has no member named 'ctx'
mozjs.c:93: error: 'ctxStore' has no member named 'run'
mozjs.c:93: warning: implicit declaration of function 'JS_DestroyRuntime'
mozjs.c:93: error: 'ctxStore' has no member named 'run'
mozjs.c:94: error: 'ctxStore' has no member named 'cls'
mozjs.c:94: error: 'ctxStore' has no member named 'cls'
mozjs.c:95: error: 'ctxStore' has no member named 'pac'
mozjs.c: In function 'ctxs_new':
mozjs.c:101: error: 'JSObject' undeclared (first use in this function)
mozjs.c:101: error: (Each undeclared identifier is reported only once
mozjs.c:101: error: for each function it appears in.)
mozjs.c:101: error: 'global' undeclared (first use in this function)
mozjs.c:102: error: 'jsval' undeclared (first use in this function)
mozjs.c:102: error: expected ';' before 'rval'
mozjs.c:108: error: 'ctxStore' has no member named 'cls'
mozjs.c:108: error: 'JSClass' undeclared (first use in this function)
mozjs.c:109: error: 'ctxStore' has no member named 'cls'
mozjs.c:110: error: 'ctxStore' has no member named 'cls'
mozjs.c:111: error: 'ctxStore' has no member named 'cls'
mozjs.c:111: error: 'JS_PropertyStub' undeclared (first use in this function)
mozjs.c:112: error: 'ctxStore' has no member named 'cls'
mozjs.c:113: error: 'ctxStore' has no member named 'cls'
mozjs.c:114: error: 'ctxStore' has no member named 'cls'
mozjs.c:115: error: 'ctxStore' has no member named 'cls'
mozjs.c:115: error: 'JS_EnumerateStub' undeclared (first use in this function)
mozjs.c:116: error: 'ctxStore' has no member named 'cls'
mozjs.c:116: error: 'JS_ResolveStub' undeclared (first use in this function)
mozjs.c:117: error: 'ctxStore' has no member named 'cls'
mozjs.c:117: error: 'JS_ConvertStub' undeclared (first use in this function)
mozjs.c:118: error: 'ctxStore' has no member named 'cls'
mozjs.c:118: error: 'JS_FinalizeStub' undeclared (first use in this function)
mozjs.c:121: error: 'ctxStore' has no member named 'run'
mozjs.c:121: warning: implicit declaration of function 'JS_NewRuntime'
mozjs.c:122: error: 'ctxStore' has no member named 'ctx'
mozjs.c:122: warning: implicit declaration of function 'JS_NewContext'
mozjs.c:122: error: 'ctxStore' has no member named 'run'
mozjs.c:123: warning: implicit declaration of function 'JS_NewObject'
mozjs.c:123: error: 'ctxStore' has no member named 'ctx'
mozjs.c:123: error: 'ctxStore' has no member named 'cls'
mozjs.c:124: warning: implicit declaration of function 'JS_InitStandardClasses'
mozjs.c:124: error: 'ctxStore' has no member named 'ctx'
mozjs.c:127: warning: implicit declaration of function 'JS_DefineFunction'
mozjs.c:127: error: 'ctxStore' has no member named 'ctx'
mozjs.c:127: error: 'dnsResolve' undeclared (first use in this function)
mozjs.c:128: error: 'ctxStore' has no member named 'ctx'
mozjs.c:128: error: 'myIpAddress' undeclared (first use in this function)
mozjs.c:129: warning: implicit declaration of function 'JS_EvaluateScript'
mozjs.c:129: error: 'ctxStore' has no member named 'ctx'
mozjs.c:130: error: 'rval' undeclared (first use in this function)
mozjs.c:133: error: 'ctxStore' has no member named 'ctx'
mozjs.c:139: error: 'ctxStore' has no member named 'pac'
mozjs.c: In function 'mozjs_pacrunner':
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:158: error: 'ctxStore' has no member named 'pac'
mozjs.c:176: error: 'jsval' undeclared (first use in this function)
mozjs.c:176: error: expected ';' before 'args'
mozjs.c:182: error: expected ';' before 'rval'
mozjs.c:183: error: 'JSBool' undeclared (first use in this function)
mozjs.c:183: error: expected ';' before 'result'
mozjs.c:184: error: 'result' undeclared (first use in this function)
mozjs.c:185: warning: implicit declaration of function 'JS_GetStringBytes'
mozjs.c:185: warning: implicit declaration of function 'JS_ValueToString'
mozjs.c:185: error: 'ctxStore' has no member named 'ctx'
mozjs.c:185: error: 'rval' undeclared (first use in this function)
mozjs.c:185: warning: passing argument 1 of 'px_strdup' makes pointer from
integer without a cast
make[3]: *** [mozjs_la-mozjs.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
libtool: compile:  i686-pc-linux-gnu-gcc -DPACKAGE_NAME=\"libproxy\"
-DPACKAGE_TARNAME=\"libproxy\" -DPACKAGE_VERSION=\"0.2.3\"
"-DPACKAGE_STRING=\"libproxy 0.2.3\""
-DPACKAGE_BUGREPORT=\"nathaniel@natemccallum.com\" -DPACKAGE=\"libproxy\"
-DVERSION=\"0.2.3\" -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/\" -DSTDC_HEADERS=1 -DHAVE__BOOL=1
-DHAVE_STDBOOL_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -I. -I../../src/lib -g
-std=c99 -O3 -march=core2 -mssse3 -msse4.1 -mcx16 -fomit-frame-pointer
-pipe -mfpmath=sse -DPLUGINDIR=\"/usr/lib/libproxy/0.2.3/plugins\"
-DSYSCONFDIR=\"/etc\" -D_POSIX_C_SOURCE=1 -MT file_la-file.lo -MD -MP -MF
.deps/file_la-file.Tpo -c file.c  -fPIC -DPIC -o .libs/file_la-file.o
mv -f .deps/file_la-file.Tpo .deps/file_la-file.Plo
libtool: link: i686-pc-linux-gnu-gcc -shared  .libs/envvar_la-envvar.o  
-Wl,-rpath
-Wl,/var/tmp/portage/net-libs/libproxy-0.2.3/work/libproxy-0.2.3/src/lib/.libs
../lib/.libs/libproxy.so -lm -ldl  -march=core2 -mssse3 -msse4.1 -mcx16
-mfpmath=sse -Wl,--as-needed   -Wl,-soname -Wl,envvar.so -o .libs/envvar.so
libtool: link: ( cd ".libs" && rm -f "envvar.la" && ln -s "../envvar.la"
"envvar.la" )
make[3]: Leaving directory
`/var/tmp/portage/net-libs/libproxy-0.2.3/work/libproxy-0.2.3/src/plugins'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/var/tmp/portage/net-libs/libproxy-0.2.3/work/libproxy-0.2.3/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/net-libs/libproxy-0.2.3/work/libproxy-0.2.3/src'
make: *** [all-recursive] Error 1

What version of the product are you using? On what operating system?
0.2.3 release on GNU/Linux gentoo 

Please provide any additional information below.

architecture host is amd64, CFLAGS make.conf profile are
: -march=native -msse3 -O2 -pipe (stable)

Original issue reported on code.google.com by romain.p...@gmail.com on 12 Apr 2009 at 5:53

Attachments:

GoogleCodeExporter commented 9 years ago
PS: see the bug https://bugs.gentoo.org/show_bug.cgi?id=259178

Original comment by romain.p...@gmail.com on 12 Apr 2009 at 5:54

GoogleCodeExporter commented 9 years ago
Romain,

There were already plenty of jspai redetection fixes in svn. Can you please 
test if
those would not be enough already?

That would be very helpful.

Original comment by dominiqu...@gmail.com on 4 May 2009 at 8:32

GoogleCodeExporter commented 9 years ago
I tested this myself now on a gentoo 2008 installation using trunk.

It compiles just fine, including the mozilla plugin. So one of the previous 
fixes for
the jsapi detection solved this already.

Original comment by dominiqu...@gmail.com on 15 May 2009 at 10:34

GoogleCodeExporter commented 9 years ago
This is not fixed by far. You have shuffled everything around and caused further
breakage with xulrunner-1.9.1_rc1. The proper fix would be to just pkg-config 
check
libxul-unstable for CFLAGS if your gonna depend on headers from unstable.

Original comment by geekypen...@gmail.com on 23 Jun 2009 at 3:47

GoogleCodeExporter commented 9 years ago
Index: configure.ac
===================================================================
--- configure.ac    (revision 393)
+++ configure.ac    (working copy)
@@ -26,9 +26,10 @@
 PKG_CHECK_MODULES(xmu, xmu, have_xmu=yes, have_xmu=no)
 PKG_CHECK_MODULES(webkit, webkit-1.0, have_webkit=yes, have_webkit=no)
 PKG_CHECK_MODULES(mozjs, xulrunner-js, have_mozjs=yes, 
+       [PKG_CHECK_MODULES(mozjs, libxul-unstable, have_mozjs=yes,
        [PKG_CHECK_MODULES(mozjs, firefox-js, have_mozjs=yes,
        [PKG_CHECK_MODULES(mozjs, mozilla-js, have_mozjs=yes, 
-       [PKG_CHECK_MODULES(mozjs, seamonkey-js, have_mozjs=yes,have_mozjs=no)])])])
+       [PKG_CHECK_MODULES(mozjs, seamonkey-js, have_mozjs=yes,have_mozjs=no)])])])])
 PKG_CHECK_MODULES(NetworkManager, NetworkManager dbus-1, 
                    have_networkmanager=yes, have_networkmanager=no)

This would be your proper fix for the issue to ensure both forward and backward
compatiblity.

Original comment by geekypen...@gmail.com on 23 Jun 2009 at 3:55