You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by John Shaver <bo...@gmail.com> on 2014/12/22 21:49:00 UTC

Compiling apachds for arm

Hello all,

Does anyone here have any experience running apacheds on ARM?

We are working on a project that will require us to compile apachds
for an arm processer.  We've attempted to compile it in raspbian and
pidora but it fails the unit tests.  I'm not sure if we should just
skip the test and use it anyway, or if there is some option we can
enable to allow it to pass.

The failure message is below, but you can see the full output here:

http://pastebin.com/drVxFz0d

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.directory.junit.tools.MultiThreadedMultiInvokerNotThreadsafeTest
Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
39.701 sec <<< FAILURE! - in
org.apache.directory.junit.tools.MultiThreadedMultiInvokerNotThreadsafeTest
org.apache.directory.junit.tools.MultiThreadedMultiInvokerNotThreadsafeTest
 Time elapsed: 4.018 sec  <<< FAILURE!
java.lang.AssertionError: Test shut run in less than 10 seconds.
    at org.junit.Assert.fail(Assert.java:93)
    at org.apache.directory.junit.tools.MultiThreadedMultiInvokerNotThreadsafeTest.checkRuntime(MultiThreadedMultiInvokerNotThreadsafeTest.java:54)

Running org.apache.directory.junit.tools.MultiThreadedMultiInvokerThreadsafeTest
Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
45.478 sec <<< FAILURE! - in
org.apache.directory.junit.tools.MultiThreadedMultiInvokerThreadsafeTest
org.apache.directory.junit.tools.MultiThreadedMultiInvokerThreadsafeTest
 Time elapsed: 5.294 sec  <<< FAILURE!
java.lang.AssertionError: Test shut run in less than 10 seconds.
    at org.junit.Assert.fail(Assert.java:93)
    at org.apache.directory.junit.tools.MultiThreadedMultiInvokerThreadsafeTest.checkRuntime(MultiThreadedMultiInvokerThreadsafeTest.java:56)


Results :

Failed tests:
  MultiThreadedMultiInvokerNotThreadsafeTest.checkRuntime:54 Test shut
run in less than 10 seconds.
  MultiThreadedMultiInvokerThreadsafeTest.checkRuntime:56 Test shut
run in less than 10 seconds.

Tests run: 22, Failures: 2, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Directory Project ........................... SUCCESS [ 30.725 s]
[INFO] Apache Directory Checkstyle Configuration .......... SUCCESS [ 21.888 s]
[INFO] Apache Directory JUnit Add-ons ..................... FAILURE [02:00 min]
[INFO] Apache Directory LDAP API .......................... SKIPPED
[INFO] Apache Directory LDAP API I18n ..................... SKIPPED
[INFO] Apache Directory LDAP API Utilities ................ SKIPPED
[INFO] Apache Directory API ASN.1 Parent .................. SKIPPED
[INFO] Apache Directory API ASN.1 API ..................... SKIPPED
[INFO] Apache Directory API ASN.1 BER ..................... SKIPPED
[INFO] Apache Directory LDAP API Parent ................... SKIPPED
[INFO] Apache Directory LDAP API Model .................... SKIPPED
[INFO] Apache Directory LDAP API Codec Parent ............. SKIPPED
[INFO] Apache Directory LDAP API Codec Core ............... SKIPPED
[INFO] Apache Directory LDAP API Net Parent ............... SKIPPED
[INFO] Apache Directory LDAP API Network MINA ............. SKIPPED
[INFO] Apache Directory LDAP API Extras ................... SKIPPED
[INFO] Apache Directory LDAP API Extras Codec API ......... SKIPPED
[INFO] Apache Directory LDAP API Extras Codec ............. SKIPPED
[INFO] Apache Directory LDAP API Codec Standalone ......... SKIPPED
[INFO] Apache Directory LDAP API DSML Parent .............. SKIPPED
[INFO] Apache Directory LDAP API DSML Parser .............. SKIPPED
[INFO] Apache Directory LDAP API Extras ACI ............... SKIPPED
[INFO] Apache Directory LDAP API Schema Parent ............ SKIPPED
[INFO] Apache Directory LDAP API Schema Data .............. SKIPPED
[INFO] Apache Directory LDAP API Client Parent ............ SKIPPED
[INFO] Apache Directory LDAP API Client API ............... SKIPPED
[INFO] Apache Directory LDAP API DSML Engine .............. SKIPPED
[INFO] Apache Directory LDAP API Extras Util .............. SKIPPED
[INFO] Apache Directory LDAP API Extras Stored Procedures . SKIPPED
[INFO] Apache Directory LDAP API Extras Trigger ........... SKIPPED
[INFO] Apache Directory LDAP API Schema Converter ......... SKIPPED
[INFO] Apache Directory API All ........................... SKIPPED
[INFO] Apache Directory LDAP API Client All ............... SKIPPED
[INFO] Apache Directory API Integration Tests ............. SKIPPED
[INFO] Apache Directory LDAP API Distribution ............. SKIPPED
[INFO] ApacheDS ........................................... SKIPPED
[INFO] ApacheDS I18n ...................................... SKIPPED
[INFO] ApacheDS Core Constants ............................ SKIPPED
[INFO] ApacheDS Core API .................................. SKIPPED
[INFO] ApacheDS Core Shared ............................... SKIPPED
[INFO] ApacheDS Interceptors .............................. SKIPPED
[INFO] ApacheDS AdministrativePoint Interceptor ........... SKIPPED
[INFO] ApacheDS Authentication Interceptor ................ SKIPPED
[INFO] ApacheDS Interceptor to increment numeric attributes SKIPPED
[INFO] ApacheDS Authorization Interceptor ................. SKIPPED
[INFO] ApacheDS ChangeLog Interceptor ..................... SKIPPED
[INFO] ApacheDS Collective Attribute Interceptor .......... SKIPPED
[INFO] ApacheDS Event Interceptor ......................... SKIPPED
[INFO] ApacheDS Exception Interceptor ..................... SKIPPED
[INFO] ApacheDS Journal Interceptor ....................... SKIPPED
[INFO] ApacheDS Normalization Interceptor ................. SKIPPED
[INFO] ApacheDS Operational Attribute Interceptor ......... SKIPPED
[INFO] ApacheDS Referral Interceptor ...................... SKIPPED
[INFO] ApacheDS Schema Interceptor ........................ SKIPPED
[INFO] ApacheDS Subtree Interceptor ....................... SKIPPED
[INFO] ApacheDS Triggers Interceptor ...................... SKIPPED
[INFO] ApacheDS Core ...................................... SKIPPED
[INFO] ApacheDS Core AVL .................................. SKIPPED
[INFO] ApacheDS Generalized (X) DBM Partition ............. SKIPPED
[INFO] ApacheDS LDIF Partition ............................ SKIPPED
[INFO] ApacheDS JDBM Partition ............................ SKIPPED
[INFO] ApacheDS Mavibot Partition ......................... SKIPPED
[INFO] ApacheDS Core Annotations .......................... SKIPPED
[INFO] ApacheDS Core JNDI ................................. SKIPPED
[INFO] ApacheDS Protocol Kerberos Codec ................... SKIPPED
[INFO] ApacheDS Interceptors for Kerberos ................. SKIPPED
[INFO] ApacheDS Protocol Dhcp ............................. SKIPPED
[INFO] ApacheDS Protocol Shared ........................... SKIPPED
[INFO] ApacheDS Protocol Dns .............................. SKIPPED
[INFO] ApacheDS Protocol Kerberos ......................... SKIPPED
[INFO] ApacheDS Protocol Ldap ............................. SKIPPED
[INFO] ApacheDS Protocol Ntp .............................. SKIPPED
[INFO] Apacheds Server Annotations ........................ SKIPPED
[INFO] ApacheDS Server Config ............................. SKIPPED
[INFO] ApacheDS Server JNDI ............................... SKIPPED
[INFO] ApacheDS Test Framework ............................ SKIPPED
[INFO] ApacheDS All ....................................... SKIPPED
[INFO] ApacheDS Logger Interceptor ........................ SKIPPED
[INFO] ApacheDS Password Hashing Interceptor .............. SKIPPED
[INFO] ApacheDS Core Integration .......................... SKIPPED
[INFO] ApacheDS Protocol Kerberos Test .................... SKIPPED
[INFO] ApacheDS Server Integration ........................ SKIPPED
[INFO] ApacheDS DirectoryService-WebApp bridge ............ SKIPPED
[INFO] ApacheDS Jetty HTTP Server Integration ............. SKIPPED
[INFO] ApacheDS Service Builder ........................... SKIPPED
[INFO] Apache Directory LDAP Client API test .............. SKIPPED
[INFO] kerberos-client .................................... SKIPPED
[INFO] ApacheDS Service ................................... SKIPPED
[INFO] ApacheDS Wrapper ................................... SKIPPED
[INFO] ApacheDS Installers Maven Plugin ................... SKIPPED
[INFO] ApacheDS Installers ................................ SKIPPED
[INFO] ApacheDS Manuals ................................... SKIPPED
[INFO] ApacheDS Build With Dependencies ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:06 min
[INFO] Finished at: 2014-12-22T11:55:52-07:00
[INFO] Final Memory: 55M/106M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.17:test
(default-test) on project junit-addons: There are test failures.
[ERROR]
[ERROR] Please refer to
/home/pi/SVN/apacheds-trunk/junit-addons/target/surefire-reports for
the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :junit-addons

I'm hoping someone has some experience with compiling for arm or can
give me some advice.

Thanks,

John

Re: Compiling apachds for arm

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 23/12/14 00:09, John Shaver a écrit :
> On Mon, Dec 22, 2014 at 4:04 PM, Stefan Seelmann
> <ma...@stefan-seelmann.de> wrote:
>> I think there is no need to compile it for ARM. Java compiler produces
>> bytecode that is platform independent. So you can just compile on
>> another machine or just download the zip/tgz version and run it on the
>> ARM with right JVM. Or am I missing something?
>
>
> I thought so too, but I'm not too experienced with Java.  When I saw
> that it was requiring a compile after downloading, I assumed it was
> using some C++ magic somewhere (I see this alot with libraries in
> nodejs and python) and that it would need to be compiled for the
> machine.
>
> If I can just compile it on my laptop and copy over the installers,
> that'd be great!
I think you probably can. In any case, we don't have any native code in
ApacheDS (native code is C code called by Java).



Re: Compiling apachds for arm

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 12/23/2014 12:09 AM, John Shaver wrote:
> On Mon, Dec 22, 2014 at 4:04 PM, Stefan Seelmann
> <ma...@stefan-seelmann.de> wrote:
>> I think there is no need to compile it for ARM. Java compiler produces
>> bytecode that is platform independent. So you can just compile on
>> another machine or just download the zip/tgz version and run it on the
>> ARM with right JVM. Or am I missing something?
> 
> 
> 
> I thought so too, but I'm not too experienced with Java.  When I saw
> that it was requiring a compile after downloading, I assumed it was
> using some C++ magic somewhere (I see this alot with libraries in
> nodejs and python) and that it would need to be compiled for the
> machine.
> 
> If I can just compile it on my laptop and copy over the installers,
> that'd be great!

If you download the binary zip/tgz [1] you just need to unpack, and
start with "bin/apacheds.sh start" (chmod +x first), no compilation
required. But I didn't test this on an ARM ;)

If you need the installer (like deb or rpm) that's another story.

Kind Regards,
Stefan

[1] https://directory.apache.org/apacheds/download/download-archive.html


Re: Compiling apachds for arm

Posted by John Shaver <bo...@gmail.com>.
On Mon, Dec 22, 2014 at 4:04 PM, Stefan Seelmann
<ma...@stefan-seelmann.de> wrote:
> I think there is no need to compile it for ARM. Java compiler produces
> bytecode that is platform independent. So you can just compile on
> another machine or just download the zip/tgz version and run it on the
> ARM with right JVM. Or am I missing something?



I thought so too, but I'm not too experienced with Java.  When I saw
that it was requiring a compile after downloading, I assumed it was
using some C++ magic somewhere (I see this alot with libraries in
nodejs and python) and that it would need to be compiled for the
machine.

If I can just compile it on my laptop and copy over the installers,
that'd be great!

-John

Re: Compiling apachds for arm

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 12/22/2014 09:49 PM, John Shaver wrote:
> Hello all,
> 
> Does anyone here have any experience running apacheds on ARM?

Me neither.

> We are working on a project that will require us to compile apachds
> for an arm processer. 

I think there is no need to compile it for ARM. Java compiler produces
bytecode that is platform independent. So you can just compile on
another machine or just download the zip/tgz version and run it on the
ARM with right JVM. Or am I missing something?

Kind Regards,
Stefan


Re: Compiling apachds for arm

Posted by John Shaver <bo...@gmail.com>.
On Mon, Dec 22, 2014 at 3:54 PM, Emmanuel Lécharny <el...@gmail.com> wrote:
> The failing test is very time dependent. The ARM processor is most
> certainly really slow, so the test that takes around 128ms on my
> computer seems to take more than 10 seconds on your device, which is
> damn slow...

Yeah, it is a RaspberryPi, so it isn't the speediest machine around.  :)

I misunderstood the failure message, I thought it was complaining that
it completed in LESS than 10 seconds, and therefore failing.  Now that
I look at the test code, I see that you are correct.  Thanks for
pointing that out!

> You can increase the allocated time to run the test in the
> MultiThreadedMultiInvokerNotThreadsafeTest.checkRuntime() method, but I
> can assure you that even if you have this test passing, you'll face
> issues later on.

Yeah, I commented the fail() line and I'm compiling it now.

> Typically, server-integ tests are taking 3 minutes on my computer, and
> likely more than 30 minutes on ARM, which will lead Maven to stop (there
> is somehow a hard coded limit in Maven that ma    ke it 'thinks' that
> some tests lasting more than 30 minutes are a failure)...

If I run into that, I will look at cross-compiling or compiling on a
faster arm processor.  Or maybe compiling maven first with that hard
coded limit changed.

Thank you sir, for pointing out my misunderstanding!  I was
considering disabling the test, but I wanted to make sure I understood
why it was failing first.

-John

Re: Compiling apachds for arm

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 22/12/14 21:49, John Shaver a écrit :
> Hello all,
>
> Does anyone here have any experience running apacheds on ARM?
Nope...
>
> We are working on a project that will require us to compile apachds
> for an arm processer.  We've attempted to compile it in raspbian and
> pidora but it fails the unit tests.  I'm not sure if we should just
> skip the test and use it anyway, or if there is some option we can
> enable to allow it to pass.

The failing test is very time dependent. The ARM processor is most
certainly really slow, so the test that takes around 128ms on my
computer seems to take more than 10 seconds on your device, which is
damn slow...

You can increase the allocated time to run the test in the
MultiThreadedMultiInvokerNotThreadsafeTest.checkRuntime() method, but I
can assure you that even if you have this test passing, you'll face
issues later on.

Typically, server-integ tests are taking 3 minutes on my computer, and
likely more than 30 minutes on ARM, which will lead Maven to stop (there
is somehow a hard coded limit in Maven that ma    ke it 'thinks' that
some tests lasting more than 30 minutes are a failure)...