HOWTO get javascript working

Thorsten Röder konq-e@mail.kde.org
Fri, 21 Mar 2003 13:22:04 +0100


Hi,
I've read the thread 
(http://lists.kde.org/?l=konq-e&m=104806524611917&w=2) about compiling 
issues with javascript.

But for me javascript isn't working at all. Everything else is working
fine, except javascript.

Is there a possibility (e.g. a patch or a hint) to get a working 
javascript implementation ?
In the thread (mentioned above) it seems only to be possible to get 
javascript working with "mode=dynamic". But then I can't use javascript 
in konq-e. It compiles fine but I think dynamic javascript doesn't work 
at all. So I tried to compile "static" javascript:

My configure with "mode=static" (!) was:
./configure --disable-debug --enable-qt-embedded --enable-embedded 
--disable-bookmarks --without-arts --with-javascript=static 
--with-konq-tmp-prefix=/tmp --with-ipv6-lookup=no 
CXXFLAGS="-DQT_NO_CLIPBOARD -DKDE_QT_ONLY" 
--with-qt-dir="/home/thorroed/qt/qt-embedded-free-3.1.2" 
--with-qt-includes="/home/thorroed/qt/qt-embedded-free-3.1.2/include" 
--with-qt-libraries="/home/thorroed/qt/qt-embedded-free-3.1.2/lib" 
--prefix="/test"


Compiling javascript support with "mode=static" fails. Make bombs out with:
=== cut ===
make[5]: Entering directory 
`/home/thorroed/kdecvs.neu/kdenox/konq-embed/kdesrc/khtml/ecma'
source='kjs_dom.cpp' object='kjs_dom.lo' libtool=yes \
depfile='.deps/kjs_dom.Plo' tmpdepfile='.deps/kjs_dom.TPlo' \
depmode=gcc3 /bin/sh ../../../../admin/depcomp \
/bin/sh ../../../../libtool --silent --mode=compile --tag=CXX g++ 
-DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../../kio 
-I../../../../khtml -I../../../../khtml/java -I./../../../dropin 
-I./../../kdecore -I./../.. -I./.. -I./../misc -I./../misc -I./../css 
-I./../dom -I./../xml -I./../html -I./../../../dropin/kio -I./../../kjs 
-I./../../../dropin/kssl -I./../../../dropin/khtml 
-I./../../../dropin/khtml/java 
-I/home/thorroed/qt/qt-embedded-free-3.1.2/include  -I/test/include 
-I/home/thorroed/qt/qt-embedded-free-3.1.2/include 
-DQT_THREAD_SUPPORT -DQWS -D_REENTRANT   -Wnon-virtual-dtor 
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith 
-Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -DNDEBUG 
-DNO_DEBUG -O2 -DQT_NO_CLIPBOARD -DKDE_QT_ONLY -Wformat-security 
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common 
-fno-rtti -DQT_NO_ASCII_CAST -fexceptions  -c -o kjs_dom.lo `test -f 
'kjs_dom.cpp' || echo './'`kjs_dom.cpp
source='kjs_html.cpp' object='kjs_html.lo' libtool=yes \
depfile='.deps/kjs_html.Plo' tmpdepfile='.deps/kjs_html.TPlo' \
depmode=gcc3 /bin/sh ../../../../admin/depcomp \
/bin/sh ../../../../libtool --silent --mode=compile --tag=CXX g++ 
-DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../../kio 
-I../../../../khtml -I../../../../khtml/java -I./../../../dropin 
-I./../../kdecore -I./../.. -I./.. -I./../misc -I./../misc -I./../css 
-I./../dom -I./../xml -I./../html -I./../../../dropin/kio -I./../../kjs 
-I./../../../dropin/kssl -I./../../../dropin/khtml 
-I./../../../dropin/khtml/java 
-I/home/thorroed/qt/qt-embedded-free-3.1.2/include  -I/test/include 
-I/home/thorroed/qt/qt-embedded-free-3.1.2/include 
-DQT_THREAD_SUPPORT -DQWS -D_REENTRANT   -Wnon-virtual-dtor 
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith 
-Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -DNDEBUG 
-DNO_DEBUG -O2 -DQT_NO_CLIPBOARD -DKDE_QT_ONLY -Wformat-security 
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common 
-fno-rtti -DQT_NO_ASCII_CAST -fexceptions  -c -o kjs_html.lo `test -f 
'kjs_html.cpp' || echo './'`kjs_html.cpp
source='kjs_window.cpp' object='kjs_window.lo' libtool=yes \
depfile='.deps/kjs_window.Plo' tmpdepfile='.deps/kjs_window.TPlo' \
depmode=gcc3 /bin/sh ../../../../admin/depcomp \
/bin/sh ../../../../libtool --silent --mode=compile --tag=CXX g++ 
-DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../../kio 
-I../../../../khtml -I../../../../khtml/java -I./../../../dropin 
-I./../../kdecore -I./../.. -I./.. -I./../misc -I./../misc -I./../css 
-I./../dom -I./../xml -I./../html -I./../../../dropin/kio -I./../../kjs 
-I./../../../dropin/kssl -I./../../../dropin/khtml 
-I./../../../dropin/khtml/java 
-I/home/thorroed/qt/qt-embedded-free-3.1.2/include  -I/test/include 
-I/home/thorroed/qt/qt-embedded-free-3.1.2/include 
-DQT_THREAD_SUPPORT -DQWS -D_REENTRANT   -Wnon-virtual-dtor 
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith 
-Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -DNDEBUG 
-DNO_DEBUG -O2 -DQT_NO_CLIPBOARD -DKDE_QT_ONLY -Wformat-security 
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common 
-fno-rtti -DQT_NO_ASCII_CAST -fexceptions  -c -o kjs_window.lo `test -f 
'kjs_window.cpp' || echo './'`kjs_window.cpp
kjs_window.cpp: In member function `virtual KJS::Value
    KJS::Window::get(KJS::ExecState*, const KJS::UString&) const':
kjs_window.cpp:512: no matching function for call to 
`KJS::Konqueror::Konqueror
    (KJS::ExecState*&, const QGuardedPtr<KHTMLPart>&)'
kjs_window.h:212: candidates are: KJS::Konqueror::Konqueror(const
    KJS::Konqueror&)
kjs_window.h:215:                 KJS::Konqueror::Konqueror(KHTMLPart*)
kjs_window.cpp: In member function `void 
KJS::Window::afterScriptExecution()':
kjs_window.cpp:864: warning: enumeration value `NullAction' not handled in
    switch
kjs_window.cpp: In member function `virtual bool
    KJS::Konqueror::hasProperty(KJS::ExecState*, const KJS::UString&) 
const':
kjs_window.cpp:1955: warning: unused parameter `KJS::ExecState*exec'
kjs_window.cpp: In member function `virtual KJS::Value
    KJS::Konqueror::get(KJS::ExecState*, const KJS::UString&) const':
kjs_window.cpp:1985: conversion from `KJS::KonquerorFunc*' to non-scalar 
type `
    KJS::Value' requested
kjs_window.cpp:1962: warning: unused parameter `KJS::ExecState*exec'
kjs_window.cpp: In member function `virtual KJS::Value
    KJS::KonquerorFunc::tryCall(KJS::ExecState*, KJS::Object&, const
    KJS::List&)':
kjs_window.cpp:1989: warning: unused parameter `KJS::ExecState*exec'
kjs_window.cpp:1989: warning: unused parameter `const KJS::List&args'
gmake[5]: *** [kjs_window.lo] Error 1
gmake[5]: Leaving directory 
`/home/thorroed/kdecvs.neu/kdenox/konq-embed/kdesrc/khtml/ecma'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory 
`/home/thorroed/kdecvs.neu/kdenox/konq-embed/kdesrc/khtml'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory 
`/home/thorroed/kdecvs.neu/kdenox/konq-embed/kdesrc'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/home/thorroed/kdecvs.neu/kdenox/konq-embed'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/thorroed/kdecvs.neu/kdenox'
gmake: *** [all] Error 2
=== cut end ==

Maybe I'm doing something wrong. Maybe you can give me a hint how to get 
  javascript support working ! Maybe someone is already working on it ?

Thanx
Thorsten Roeder