phylo42 / PEWO

Phylogenetic Placement Evaluation Workflows : Benchmark placement software and different reference trees
MIT License
12 stars 9 forks source link

javac encoding issues #5

Closed pierrebarbera closed 3 years ago

pierrebarbera commented 3 years ago

Hi!

just ran into an issue with javac (via conda) choosing US-ASCII as encoding, causing the build to fail:

[javac] /home/folder/PEWO/scripts/java/PEWO_java/lib/RAPPAS/src/inputs/FASTQPointer.java:84: error: unmappable character (0xA9) for encoding US-ASCII
[javac]                 //elimination des character sp??ciaux
[javac]                                                ^
[javac] 68 errors
[javac] 1 warning

This may be a very system setup dependent issue affecting pretty much noone. Regardless, I thought I'd post the issue and a quick fix anyway.

Fix:

export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8

and re-run the PEWO installer.

Pierre

blinard-BIOINFO commented 3 years ago

Dear Pierre,

Thanks for spotting this issue ! I will add your suggestion to the install script.

May I ask which setup you used to raise this bug ? (OS, java version/package installed...) I tried PEWO on different minimal Unix images (using virual box) and never ran into it UTF8 issues.

pierrebarbera commented 3 years ago

Hi Benjamin,

OS: CentOS 8 OpenJDK Runtime Environment 18.9 javac 11.0.9

(though I'm not sure its this system wide version that was used during the install, over the conda package specified in the environment)

Interestingly the system wide encoding actually seems to be set correctly:

~$ echo $LANG
en_US.UTF-8
blinard-BIOINFO commented 3 years ago

I actually used a slightly different approach. Adding encoding="UTF-8" in the ant build file should be more portable than exporting variables.

Fixed with commit 6a02180 in PEWO_java repository. Fixed with commit 8937150 in RAPPAS repository. ( Side note for @nromashchenko : I just realized that without github PRO we cannot reference commits from submodules... )

@Pbdas : Would you mind to test again a fresh install on your setup following this fix and report if this was enough ? I do not manage to reproduce this bug on my side.

pierrebarbera commented 3 years ago

I did a fresh clone on the machine I used previously, as well as a fresh clone on a practically identical machine that should be a relatively blank slate, and the issue was gone on both :)

blinard-BIOINFO commented 3 years ago

Thank you for your reply.

Bug fixed