So, to start this of with a meme: One does not simply - compile Apache
James from source.
Idk if and what I'm doin wrong here, but either its my hardware screwing
up everything I've learned about Java (would explain random crashes in
GTA5 tho) or I'm just to stupid to correctly setup the needed build
environment to get a successfull build.
But let me start from the beginning why I'm back after abandoning this
mail-list (still not used to this kind of public communication):
So as I was successfull to compile one of the latest builds before this
project moved to Docker and have it running on my openSuSE-tumbleweed
server since (and as smart as I am: deleted the built package - of
course!) - I just looked up the main project page and noticed: oh, it's
out of beta - RC1 available for download. But as the page shows "Docker"
(sidenote: yea - I know it makes sense to "containerize" such code - to
run a Java code as root is not the smartest idea one can have) I said to
mysefl: "screw it - compile from source" - and off we go from "wonder if
it's still crap as last time I tried" to "what the F*?".
So let me show the results first and then let me explain why I think my
hardware is broken:
vm - opensuse tumbleweed - failed: apache-james-mailbox-hbase
vm - debian 8.8.0 - failed: james-server-mailets
host - win7 sp1 ulti x64 - failed: apache-james-mailbox-store
I don't bother you with posting the logs - as it seems some wired
random-ish but surprisingly re-produceable stuff going on here:
As building james isn't more than compiling Java source into bytecode -
and as Java is supposed to be platform-independent - it should fail on
the exact same point on each different system - but it doesn't. Unlike
earlier tries where it "crashed" random on the same system - at least no
it's "crashing" on the same spot every time - but why and how? The only
difference are Linux vs Windows and openJDK8u131 vs Oracle 8u121 - and
as far as I know Java as a hobbiest dev this shouldn't happen. At least
the error should be the same accross differnt systems - no matter if VM
or real hardware.
Ok, the error on windows seems to be some wired random-ish encoding
issue, see the few lines of log as follows:
Failed tests:
DefaultTextExtractorTest.textTest:44 expected:<...e awesome text text.[
]
"> but was:<...e awesome text text.[
]
">
I can only imagine there is something goin on with different
line-endings as the build expecting only linux-style \n while my windows
using \r\n - confusing the equality check to fail (some more like this
if you try to bootstrap ant from source on windows - it fails cause
windows doesn't support posixfileattributes - wich could checked and
handled in a very easy way - but this should belong to the ant-maillist).
The other two on the linux-based systems are very strange:
On the openSuSE (ok, to be honest - it's the distro I "grew up" with -
and strangely the only major distro that somehow no body seems to like
and therefore isn't really supported at all - just: WHY? cause its
german?) it fails with java.lang.ExceptionInInitializerError for
org.apache.james.mailbox.hbase.user.HBaseSubscriptionMapperTest.<clinit>
followed by java.lang.NoClassDefFoundError: Could not initialize class
org.apache.james.mailbox.hbase.user.HBaseSubscriptionMapperTest
On the debian (wich went way better and further than the other two) it
fails with this crap:
Failed tests:
RemoteDeliveryTest.remoteDeliveryShouldSplitMailsByServerWhenNoGateway:123
Expecting:
<[FakeMail{msg=null, recipients=[ot...@james.apache.org,
a...@james.apache.org], name=mail_name-to-james.apache.org, sender=null,
state=null, errorMessage=null, lastUpdated=null, attributes={}, size=0,
remoteAddr=127.0.0.1}, FakeMail{msg=null,
recipients=[a...@james2.apache.org], name=mail_name-to-james2.apache.org,
sender=null, state=null, errorMessage=null, lastUpdated=null,
attributes={}, size=0, remoteAddr=127.0.0.1}]>
to contain only:
<[FakeMail{msg=null, recipients=[a...@james.apache.org,
ot...@james.apache.org], name=mail_name-to-james.apache.org,
sender=null, state=null, errorMessage=null, lastUpdated=null,
attributes={}, size=0, remoteAddr=127.0.0.1}, FakeMail{msg=null,
recipients=[a...@james2.apache.org], name=mail_name-to-james2.apache.org,
sender=null, state=null, errorMessage=null, lastUpdated=null,
attributes={}, size=0, remoteAddr=127.0.0.1}]>
elements not found:
<[FakeMail{msg=null, recipients=[a...@james.apache.org,
ot...@james.apache.org], name=mail_name-to-james.apache.org,
sender=null, state=null, errorMessage=null, lastUpdated=null,
attributes={}, size=0, remoteAddr=127.0.0.1}]>
and elements not expected:
<[FakeMail{msg=null, recipients=[ot...@james.apache.org,
a...@james.apache.org], name=mail_name-to-james.apache.org, sender=null,
state=null, errorMessage=null, lastUpdated=null, attributes={}, size=0,
remoteAddr=127.0.0.1}]>
Just another encoding-issue based on non-standard non-EN/US setup (all
systems share locale de-de)? This seems to be another issue based on
wrong String comparison.
So - to complete this kinda sarcastic-ish mail with a few final words:
1.) Does anyone of you have any clue why the same source behave so
differently on different systems? This is somehow against anything else
I know about Javas famous "write once - run everywhere".
2.) Could anybody please be so kind to just get a me quick overview
about how to correctly setup a working build environment to get the
current source built successfully?
Call me stupid - or just naiv cause I don'T know anything about modern
development on projects this size - but as a Windows-98 kid from times
where Google didn't existed yet and just got few low-ish games by burned
CDs from school friends (online DRM wasn't a thing back then) who is
just used to "double-click on setup/install and hit next until it says
fin" - there is no clue why this to-be-simple-magic-box called "PC"
under my desk behaves this way. It's just a big calculator - and I
expect it to output 2 if I enter 1+1. Maybe someone can explain ...
I don'T really expect any serious response/reply - nor to have any
changes in the source - but as Benoit Tellier (btw: big shout outs to
him) once told me: each commit gets auto-compiled and only passed ones
even released to public - so it has to be some sort of error on my site.