ckeditor4-sdk icon indicating copy to clipboard operation
ckeditor4-sdk copied to clipboard

SDK building does not work

Open AnnaTomanek opened this issue 8 years ago • 7 comments

On current master (e2e3415296cd38742c4420b905b9fc6d4a350447), using the build method recommended by Marek, CKEditor no longer builds for me.

vagrant@precise32:~$ ls /dev/ckeditor-sdk
bender.js  gruntfile.js  package.json  template  vm
dev        LICENSE.md    README.md     tests     web.config
docs       node_modules  samples       vendor
vagrant@precise32:~$ cd /dev/ckeditor-sdk
vagrant@precise32:/dev/ckeditor-sdk$ grunt build
Running "compass:sdk-build-css" (compass) task

Running "mkdir:build" (mkdir) task
Creating "build"...OK

Running "shell:sdk-build" (shell) task
Building offline version of CKEditor SDK.
Removing old release directory /dev/ckeditor-sdk/build/offline
Building CKEditor from presets...
CKEditor Presets Builder
========================

Checking/Updating CKBuilder...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left
  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0



Copying extra plugins...


Deleting build/4.5.7/standard-all...


Building the 'standard' preset...

Exception in thread "main"
org.mozilla.javascript.EvaluatorException: Function importClass must be called with a class; had "[JavaPackage com.google.javascript.jscomp.CompilationLevel]" instead. (c:\ckbuilder\src/lib/javascript.js#12)


        at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)


        at org.mozilla.javascript.Context.reportRuntimeError(Context.java:913)


        at org.mozilla.javascript.Context.reportRuntimeError(Context.java:969)


        at org.mozilla.javascript.Context.reportRuntimeError1(Context.java:932)


        at org.mozilla.javascript.ImporterTopLevel.js_importClass(ImporterTopLevel.java:162)


        at org.mozilla.javascript.ImporterTopLevel.execIdCall(ImporterTopLevel.java:237)


        at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97                                )


        at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)


        at ckbuilder.lib.javascript._c_script_0(c:\ckbuilder\src/lib/javascript.js:12)


        at ckbuilder.lib.javascript.call(c:\ckbuilder\src/lib/javascript.js)


        at ckbuilder.lib.javascript.exec(c:\ckbuilder\src/lib/javascript.js)


        at org.mozilla.javascript.tools.shell.Global.loadClass(Global.java:311)


        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)


        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


        at java.lang.reflect.Method.invoke(Method.java:622)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
        at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
        at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
        at ckbuilder.ckbuilder._c_anonymous_3(c:\ckbuilder\src/ckbuilder.js:61)
        at ckbuilder.ckbuilder.call(c:\ckbuilder\src/ckbuilder.js)
        at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
        at ckbuilder.ckbuilder._c_script_0(c:\ckbuilder\src/ckbuilder.js:101)
        at ckbuilder.ckbuilder.call(c:\ckbuilder\src/ckbuilder.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
        at ckbuilder.ckbuilder.call(c:\ckbuilder\src/ckbuilder.js)
        at ckbuilder.ckbuilder.exec(c:\ckbuilder\src/ckbuilder.js)
        at org.mozilla.javascript.optimizer.OptRuntime$1.run(OptRuntime.java:218)
        at org.mozilla.javascript.Context.call(Context.java:489)
        at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504)
        at org.mozilla.javascript.optimizer.OptRuntime.main(OptRuntime.java:206)
        at ckbuilder.ckbuilder.main(c:\ckbuilder\src/ckbuilder.js)

1
undefined

Done, without errors.

This is pretty urgent as we need to be able to update the SDK samples for CKEditor 4.5.8 and the Accessibility Checker release.

AnnaTomanek avatar Mar 30 '16 11:03 AnnaTomanek

Works for me.

It seems that your Vagrant box has old Java version. You need at least 8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

After upgrading Java, SDK should build without errors.

Comandeer avatar Mar 31 '16 08:03 Comandeer

I updated Vagrant to 1.8.1 and VirtualBox to 5.0.16. Still the same error when building.

AnnaTomanek avatar Mar 31 '16 09:03 AnnaTomanek

According to http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/ try running following command before grunt build:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Comandeer avatar Mar 31 '16 10:03 Comandeer

Build was successfully ran, however we need to publish a proper Vagrant .box image, complete the instruction and merge it to master. It has been extracted to #175.

mlewand avatar Mar 31 '16 11:03 mlewand

Actually, the build was successfully ran once. Now I'm getting the following:

Building CKEditor finished.
CKEditor version: 4.5.8
CKEditor path: /dev/ckeditor-sdk/vendor/ckeditor-presets/build/4.5.8/standard-all/ckeditor/
Copying template files
Copying sample files
Copying vendor files
Copying CKEditor files
Copying Mathjax files
Reading sample directory /dev/ckeditor-sdk/samples
Validating links in samples and index
Parsing categories
Copying guides
Fixing guides links
Building documentation.
3
undefined

And the build is created, but with samples only, no documentation. At the same time building documentation directly from ckeditor-docs work without issues.

AnnaTomanek avatar Apr 08 '16 07:04 AnnaTomanek

It seems that the most troublesome issue with building on Windows/in VM is connected with buildDocumentation method. The system keeps informing that grunt is not known. Maybe exporting PATH with path to the global npm modules would fix it?

Comandeer avatar Apr 12 '16 10:04 Comandeer

There were issues with some mkdir or rm or cp args which the Windows shell doesn't support. AFAIR it'd require some effort to replace that with Node.js stuff, but you can try.

Reinmar avatar Apr 12 '16 12:04 Reinmar