History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-14767
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: None None
Assignee: Kristen Sindac
Reporter: Tom Chiverton
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Flex SDK

Flex trunk does not compile out of the box on Linux

Created: 02/25/08 08:06 AM   Updated: 04/07/08 02:28 PM
Component/s: Coding Practices
Security Level: Public (All JIRA Users )

File Attachments: 1. File build.xml.diff (0.7 kb)


Severity: Non Functioning
Reproducibility: Every Time
Discoverability: Medium
Found in Version: SDK Gumbo Iteration 4
Milestone: SDK Flex 3.0.1
Affected OS(s): Linux - SUSE 10.1
Steps to Reproduce:
The following issues should be addressed:
1) setup.sh replaces any existing ANT_HOME or JAVA_HOME rather than reusing (workaround: set these and update PATH by hand)
2) setup.sh assumes either Windows or Mac OS for default ANT/JAVA homes (workaround as above)
3) ant -q checkintests fails because there is no detection for the linux ${flash.player} :
# ant -q checkintests
     [echo] launching player and swf
BUILD FAILED
/home/chivertont/Projects/adobe-flex-svn/trunk/build.xml:788: Execute failed: java.io.IOException: Cannot run program "${flash.player}" (in directory "/home/chivertont/Projects/adobe-flex-svn/trunk/frameworks"): java.io.IOException: error=2, No such file or directory

Working around this (hacky diff attached) leads to various sandbox errors during the checkin tests, such as:
     [exec] SecurityError: Error #2148: SWF file file:///home/chivertont/Projects/adobe-flex-svn/trunk/frameworks/tests/componentSmoke/componentSmoke2.swf cannot access local resource file:///home/chivertont/Projects/adobe-flex-svn/trunk/frameworks/tests/componentSmoke/smokeImage.jpg. Only local-with-filesystem and trusted local SWF files may access local resources.

However, mxmlc is built.
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: No
QA Owner: Kristen Sindac
Resolved by: Lauren Park
Fixed Version: SDK Gumbo Iteration 4 - Next Build
Confirmed Version: SDK Gumbo Iteration 4 - 4.0.0.1358
Participants: Jono, Kristen Sindac, Paul Reilly, Robert Vollmar and Tom Chiverton
JDK: Sun 1.6.x

Sub-Tasks  All   Open   
 Sub-Task Progress: 

 All   Comments      Sort Order:
Robert Vollmar - [02/25/08 05:27 PM ]
Hi Tom,
It would be really helpful if you could go through these steps:

http://opensource.adobe.com/wiki/display/flexsdk/Submitting+a+Patch

to submit patches for build.xml and setup.sh. (We can test the procedure for open source contributions too.)

Thanks!
- Rob

Tom Chiverton - [02/26/08 03:23 AM ]
I will start this process later today.

Kristen Sindac - [02/26/08 07:15 PM ]
Reproduced in an image of Suse linux 9.3.
To be able to run the checkintest, I had to:
- unzip /flex/sdk/trunk/in/player/lnx/flashplayer.tar.gz
- add the following in build.xml

<condition property="flash.player" value="${basedir}/in/player/lnx/flashplayer">
 <os family="unix"/>
</condition>

Paul Reilly - [02/29/08 10:36 AM ]
This should be fixed by revision 694.

Kristen Sindac - [03/18/08 01:39 PM ]
setup.sh was modified after the patch was submitted.
Checking for JAVA_HOME and ANT_HOME setting was removed.

According to Jono, this was not how it was supposed to work for mac and windows.
The patch for the linux part remains as-is, aside from the checking of JAVA_HOME and ANT_HOME.

It is noted in setup.sh that you'll have to edit the paths if java and ANT are not installed in the location indicated.
So not having the checking of JAVA_HOME and ANT_HOME may be fine.
 However, shouldn't the default paths in linux setup up point to specific java and ANT builds (like mac and windows) so that it's more clear that ant1.7 and jdk1.5 are the required versions when building the project?

i.e
ANT_HOME=/usr/share/apache-ant-1.7.0



Tom Chiverton - [03/18/08 04:15 PM ]
"So not having the checking of JAVA_HOME and ANT_HOME may be fine. "
Depends on the intent of setup.sh - should it just setup the build environment (to some defaults that may or may not be correct), or attempt to find problems (and fix them if possible).
The latter was my intent in checking /etc/alternatives if JAVA_HOME wasn't set, for instance.

The deps on specific Ant and JDK versions was announced after my initial patch.
Simple checks on, for instance, `$JAVA_HOME/bin/java -version` or similar should suffice.
If it's meant to be a cross-platform environment checker/configurer then I don't mind (re)doing the Linux bits.

If setup.sh is meant to just be an example of what environment vars are required, why not just remove it and update the build docs ?

Jono - [03/20/08 01:24 PM ]
The whole point of the script is to instantly, and forcibly, set up the environment correctly for your OS. Many systems already have JAVA_HOME set up; that's well and good but we're interested in it being the correct version, so if it's already set, and you don't want to change it, don't use the script.

The script matches the documentation on the open source page; and for a Mac, it matches the out-of-box locations of Java. If you'd like to provide instructions to add for Linux, and any other Linux changes, that'd be great! We need this script to work for people who have never built before, and it does work for vets who've been working on the code for a long time -- you may have to edit a path here or there, no big deal.

The script does find problems of missing paths -- if ant is not found, it will warn you -- that warning should cause you to fix where ant is on the system or in the script. Further, the deps on specific Ant and JDK existed before your patch, it was in the docs, and the original paths specified ant 1.6.2 and java 1.4.2.

does that clear things up?

Tom Chiverton - [03/23/08 01:40 PM ]
Perfectly Jono, cheers.
It appears the checks for an previously unpacked player on Linux got lost in the shuffle.
Patch attached.

Jono - [03/24/08 04:27 PM ]
Actually, that's in there. Is it not working? See line 31 of the latest build.xml:
    <condition property="flash.player" value="${basedir}/in/player/lnx/flashplayer">
        <os family="unix"/>
    </condition>

Does that not work -- is there another os family we should be using? One of our devs uses Linux for development, I think it works for him...

Tom Chiverton - [03/25/08 08:33 AM ]
Jono - I meant in the setup.sh, not the ant build.xml - see #SDK-15042

Jono - [03/25/08 03:12 PM ]
Ohh I see it now, okay, thanks.

Kristen Sindac - [04/07/08 02:28 PM ]
confirmed fix by calling the following:

rm in/player/lnx/flashplayer
source setup.sh (unpacks flashplayer since it doesn't exist in the folder yet)
source setup.sh (did not unpack player)
touch in/player/lnx/flashplayer.tar.gz
source setup.sh (unpacks player)