Getting started with contribution: How to build from source?

Hey! I want to build/run the source files given here: https://github.com/processing/processing.
However, the github wiki page seems to be under development: https://github.com/processing/processing/wiki/Build-Instructions . I’m looking for build commands, not sure if I need ant.

Many thanks,
Shikhar

Yes, you need ant. Could you open a github ticket reporting this problem in the wiki page please?

Kf

Thanks!
Alright, I’ve opened an issue here: https://github.com/processing/processing/issues/5638

1 Like

It looks like a rogue had deleted the wiki page – but the instructions are now restored:

Build instructions:

I was recently building from source (it comes up for me every 2-3 years or so) and I did it using Docker so that I didn’t have to set up ant / jdk etc on my system. If you are familiar with Docker, this will work for you if you are trying to build a for Linux:

Build Processing on Linux in a Docker container

# Dockerfile for building Processing PDE on Linux using ant/jdk8
FROM frekele/ant:1.10.3-jdk8 AS buildenv
WORKDIR /root
RUN apt-get -y install git
# point at your altered fork here:
RUN git clone https://github.com/processing/processing.git --depth 1
WORKDIR /root/processing/build/
RUN ant clean
RUN ant build

Depending on what you want to do next, you can extend the Dockerfile to copy the build results out to a locally mounted volume – or copy them into another container, such as one running the app over a VNC or X11-hosted linux desktop. Here are two examples:

3 Likes

Fail: Build from Source described in https://github.com/processing/processing/wiki/Build-Instructions.
No error codes, now warnings, just no processing window open at the end.
Did show one of the jre-download:

     Header Name:null
     Header value:HTTP/1.1 404 Not Found

Suspect the Oracle “you need to log into your oracle account to download java” is not a match with your jre-download procedure in build.xml
The clue which suggests this is that after the ant run
the \myGitHubLocation\processing\build\jre\bin\ directory has only one ~7kb file named Downloader.class

My system:

Windows 7 pro, SP1
Oracle java downloaded today versions:  jdk1.8.0_211  and jre1.8.0_211
ant downloaded today:  version 1.10.6
ANT_HOME is set, 
JAVA_HOME is set to jdk
path has     %ANT_HOME%\bin;%JAVA_HOME%\bin;  
new command prompt window (post environment variable set) confirms   both 
     ant -version   
     java -version

Output from ant run is

Buildfile: C:\a_GitHub\processing\build\build.xml

run:

ignore-tools:
     [echo] Ignore the 'Unable to locate tools.jar' message.
     [echo] The tools.jar file is not required to build Processing.

revision-check:

windows-check-os:

jre-check:

downloader-setup:

compile:

dist:

jre-download:
[downloader] Redirecting to https://edelivery.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-windows-x64.tar.gz
[downloader] Redirecting to http://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-windows-x64.tar.gz?AuthParam=1559147309_1841c447d1cb984d09e29377057e36fa
[downloader] Redirecting to https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-windows-x64.tar.gz?AuthParam=1559147309_1841c447d1cb984d09e29377057e36fa
[downloader] Header Name:Accept-Ranges
[downloader] Header value:bytes
[downloader] 
[downloader] Header Name:null
[downloader] Header value:HTTP/1.1 404 Not Found
[downloader] 
[downloader] Header Name:Server
[downloader] Header value:AkamaiNetStorage
[downloader] 
[downloader] Header Name:ETag
[downloader] Header value:"477d9862374177c810b0b7d73b4f1e53:1531792454.541174"
[downloader] 
[downloader] Header Name:Connection
[downloader] Header value:keep-alive
[downloader] 
[downloader] Header Name:Last-Modified
[downloader] Header value:Wed, 31 Aug 2011 20:28:54 GMT
[downloader] 
[downloader] Header Name:Content-Length
[downloader] Header value:7073
[downloader] 
[downloader] Header Name:Date
[downloader] Header value:Wed, 29 May 2019 16:26:29 GMT
[downloader] 
[downloader] Header Name:Content-Type
[downloader] Header value:text/html
[downloader] 

Workarounds tried/failed.

  1. Copied the jre1.8.0_211 directory into the \myGitHubLocation\processing\build\jre directory
    and changed the build.xml variable to match:
    property name=“jdk.update” value=“211” /
  2. Copied the jdk1.8.0_211 directory into \myGitHubLocation\processing\build\jre
1 Like

You might want to open this as an issue if you have not already, and post the issue link here

Did open as an issue. link is:
Build from Source fails. Seems to not acquire oracle java

1 Like

Try workaround suggested in https://github.com/processing/processing/issues/5860

Kf

Hi!
I’ve been trying to build the IDE. I get this error on executing

ant run
Buildfile: /home/svr8/Desktop/Code/forked/processing/build/build.xml

run:

ignore-tools:
     [echo] Ignore the 'Unable to locate tools.jar' message.
     [echo] The tools.jar file is not required to build Processing.

check-linux-arm32:

check-linux-arm64:

revision-check:

linux-check-os:

jre-check:

downloader-setup:

compile:

dist:

jre-download:
[downloader] Redirecting to https://edelivery.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-x64.tar.gz
[downloader] Redirecting to http://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-x64.tar.gz?AuthParam=1560284548_0274da5e9b581874b5df5d5e7855cfbf
[downloader] Redirecting to https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-x64.tar.gz?AuthParam=1560284548_0274da5e9b581874b5df5d5e7855cfbf
[downloader] Header Name:Accept-Ranges
[downloader] Header value:bytes
[downloader] 
[downloader] Header Name:null
[downloader] Header value:HTTP/1.1 404 Not Found
[downloader] 
[downloader] Header Name:Server
[downloader] Header value:AkamaiNetStorage
[downloader] 
[downloader] Header Name:ETag
[downloader] Header value:"477d9862374177c810b0b7d73b4f1e53:1531792454.541174"
[downloader] 
[downloader] Header Name:Connection
[downloader] Header value:keep-alive
[downloader] 
[downloader] Header Name:Last-Modified
[downloader] Header value:Wed, 31 Aug 2011 20:28:54 GMT
[downloader] 
[downloader] Header Name:Content-Length
[downloader] Header value:7073
[downloader] 
[downloader] Header Name:Date
[downloader] Header value:Tue, 11 Jun 2019 20:20:32 GMT
[downloader] 
[downloader] Header Name:Content-Type
[downloader] Header value:text/html
[downloader]

java -version
java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

javac -version
javac 1.8.0_202

ant -version
Apache Ant(TM) version 1.10.5 compiled on March 28 2019

OS
Ubuntu 19.04

You said you get an error message. Was it just the [downloader] log? I don’t see an error.

Oh right! No errors but I’m can’t understand what’s happening exactly. Earlier, after the downloads, the ide used to start.

If your OS in Windows, go to your local Processing repo, build your repo and then go inside the build\Windows folder. Can you find the PDE executable there? I understand the PDE should execute at the end of the build and it is not happening in your case. Note the build instructions were updated recently. Not sure if the build file was modified in this update. Can you confirm you are downloading the latest copy of the Processing code from the repo?

Kf

1 Like

I have forked the repository again recently and cloned it. It is the latest version.
I am in Linux (Ubuntu 19.04). Is there anyway to check on Linux? These are the files in the /build/linux:
appdata.xml desktop.template processing.desktop uninstall.sh control install.sh processing-pde.xml copyright processing processing.sharedmimeinfo

My Windows partition on the system is not setup with Java and other tools yet. I’ll try it on windows soon.

I do not have Linux so I cannot test this unfortunately. From the files you listed in your /build/linux, I can see you have processing. OYu should be able to execute it manually from the terminal. Go to that folder and run ./processing. Does it launch? If you get an error, please copy and paste it here and if possible, get a screenshot.

Also, please provide your java -version and ant -version output if you haven’t done so.

Kf

On executing ./processing as mentioned, error:
Error: Could not find or load main class processing.app.Base

java -version
java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

javac -version
javac 1.8.0_202

ant -version
Apache Ant(TM) version 1.10.5 compiled on March 28 2019

OS
Ubuntu 19.04