Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cbi-dev] Natives compile issue on Windows and Mac

Hi Everyone,

I was able to get my Windows environment working. After some investigation I discovered that SWT Windows build.bat seems to expect packages to be installed in very specific locations (see attached build.bat).

Specifically for Windows x86_64 I had to install the following:

Windows Server 2003 SP1 SDK to:    C:\BUILD\swt-builddir\MSSDKs\Windows Server 2003 SP1 SDK\
Java SDK to:    C:\BUILD\swt-builddir\ibm-sdk50-x86_64\

Once these were in place I was able to successfully build org.eclipse.swt.win32.win32.x86_64.


I'm now running into build issues with org.eclipse.core.filesystem.win32.x86_64 which seems to be complaining about not being able to find make_x64.bat for some reason (see attached org.eclipse.core.filesystem.win32.x86_64log).

Looking in the pom.xml file I can see that it's looking for this file in the directory ../org.eclipse.core.filesystem/natives/win32/x64/ and I can see it existing:

$ ls ../org.eclipse.core.filesystem/natives/win32/x64/
make_x64.bat

Does anyone know why the build is having trouble executing this file?


Thanh

On 18/07/2012 8:29 AM, Krzysztof Daniel wrote:
Regarding the windows issue: it would be good to consult SWT commiters
to check what they are using. But the first thing to check is to try to
compile sources manually, according to
http://www.eclipse.org/swt/faq.php#howbuilddll.

Note that the compiler, just before it start its work, prints out:
     [exec] The system cannot find the path specified.
This may be a hint.





[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (natives) on project org.eclipse.cor
e.filesystem.win32.x86_64: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "m
ake_x64.bat" (in directory "c:\Users\thanh.ha\git\R4_platform-aggregator\eclipse.platform.resources\bundles\
org.eclipse.core.filesystem\natives\win32\x64"): CreateProcess error=2, The system cannot find the file specified
[ERROR] around Ant part ...<exec newenvironment="false" dir="../org.eclipse.core.filesystem/natives/win32/x64/" executab
le="make_x64.bat"/>... @ 4:115 in c:\Users\thanh.ha\git\R4_platform-aggregator\eclipse.platform.resources\bu
ndles\org.eclipse.core.filesystem.win32.x86_64\target\antrun\build-main.xml
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plu
gin:1.7:run (natives) on project org.eclipse.core.filesystem.win32.x86_64: An Ant BuildException has occured: Execute fa
iled: java.io.IOException: Cannot run program "make_x64.bat" (in directory "c:\Users\thanh.ha\git\R4_platfor
m-aggregator\eclipse.platform.resources\bundles\org.eclipse.core.filesystem\natives\win32\x64"): CreateProcess error=2,
The system cannot find the file specified
around Ant part ...<exec newenvironment="false" dir="../org.eclipse.core.filesystem/natives/win32/x64/" executable="make
_x64.bat"/>... @ 4:115 in c:\Users\thanh.ha\git\R4_platform-aggregator\eclipse.platform.resources\bundles\or
g.eclipse.core.filesystem.win32.x86_64\target\antrun\build-main.xml
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: Execute failed: java.io.IO
Exception: Cannot run program "make_x64.bat" (in directory "c:\Users\thanh.ha\git\R4_platform-aggregator\ecl
ipse.platform.resources\bundles\org.eclipse.core.filesystem\natives\win32\x64"): CreateProcess error=2, The system canno
t find the file specified
around Ant part ...<exec newenvironment="false" dir="../org.eclipse.core.filesystem/natives/win32/x64/" executable="make
_x64.bat"/>... @ 4:115 in c:\Users\thanh.ha\git\R4_platform-aggregator\eclipse.platform.resources\bundles\or
g.eclipse.core.filesystem.win32.x86_64\target\antrun\build-main.xml
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:355)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: c:\Users\thanh.ha\git\R4_platform-aggregator\eclipse.platform.resources\bundles\org.eclipse.core.
filesystem.win32.x86_64\target\antrun\build-main.xml:4: Execute failed: java.io.IOException: Cannot run program "make_x6
4.bat" (in directory "c:\Users\thanh.ha\git\R4_platform-aggregator\eclipse.platform.resources\bundles\org.ec
lipse.core.filesystem\natives\win32\x64"): CreateProcess error=2, The system cannot find the file specified
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:675)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:327)
        ... 21 more
Caused by: java.io.IOException: Cannot run program "make_x64.bat" (in directory "c:\Users\thanh.ha\git\R4_pl
atform-aggregator\eclipse.platform.resources\bundles\org.eclipse.core.filesystem\natives\win32\x64"): CreateProcess erro
r=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
        at java.lang.Runtime.exec(Runtime.java:593)
        at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
        at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
        ... 34 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
        at java.lang.ProcessImpl.start(ProcessImpl.java:30)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
        ... 40 more
@rem ***************************************************************************
@rem Copyright (c) 2000, 2012 IBM Corporation and others.
@rem All rights reserved. This program and the accompanying materials
@rem are made available under the terms of the Eclipse Public License v1.0
@rem which accompanies this distribution, and is available at
@rem http://www.eclipse.org/legal/epl-v10.html
@rem
@rem Contributors:
@rem      IBM Corporation - initial API and implementation
@rem ***************************************************************************

@echo off

IF EXIST C:\BUILD\swt-builddir set SWT_BUILDDIR=C:\BUILD\swt-builddir
IF x.%SWT_BUILDDIR%==x. set SWT_BUILDDIR=S:\swt-builddir
echo SWT build dir: %SWT_BUILDDIR%
IF x.%MSSDK%==x. set MSSDK="%SWT_BUILDDIR%\MSSDKs\Windows Server 2003 SP1 SDK"

IF x.%1==x.x86 GOTO X86
IF x.%1==x.x86_64 GOTO X86_64
IF x.%1==x.ia64 GOTO IA64

:X86
IF "x.%OUTPUT_DIR%"=="x." set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.x86
IF x.%JAVA_HOME%==x. set JAVA_HOME=%SWT_BUILDDIR%\ibm-java2-sdk-50-win-i386
IF x.%BUILD_XULRUNNER%==x.true GOTO XULRUNNER
call "%SWT_BUILDDIR%\MSVCs\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
call %MSSDK%\setenv /XP32 /RETAIL
IF x.%1==x.x86 shift
GOTO MAKE

:XULRUNNER
IF x.%DEV_TOOLS%==x. set DEV_TOOLS=S:\swt-builddir
set MSSDK="%SWT_BUILDDIR%\MSSDKs\feb2003"
call %SWT_BUILDDIR%\MSVCs\msvc60\vc98\bin\vcvars32.bat
call %MSSDK%\setenv /XP32 /RETAIL
IF x.%XULRUNNER_SDK%==x. set XULRUNNER_SDK=%SWT_BUILDDIR%\gecko-sdk
IF x.%1==x.x86 shift
GOTO MAKE

:X86_64

call %MSSDK%\setenv /X64 /RETAIL
IF "x.%OUTPUT_DIR%"=="x." set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.x86_64
IF x.%JAVA_HOME%==x. set JAVA_HOME=%SWT_BUILDDIR%\ibm-sdk50-x86_64
set CFLAGS=-DJNI64
shift
GOTO MAKE

:IA64

call %MSSDK%\setenv /SRV64 /RETAIL
IF "x.%OUTPUT_DIR%"=="x." set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.ia64
IF x.%JAVA_HOME%==x. set JAVA_HOME=%SWT_BUILDDIR%\ibm-sdk142-ia64
set CFLAGS=-DJNI64
shift
GOTO MAKE

:MAKE
nmake -f make_win32.mak %1 %2 %3 %4 %5 %6 %7 %8 %9

Back to the top