Building Renjin

22 views
Skip to first unread message

Per Nyfelt

unread,
Dec 29, 2018, 9:47:36 AM12/29/18
to Renjin
Hi,

I have been trying to build Renjin so that I will be able to contribute patches etc. in the future. 
I am on Linux Mint 19 so installed Vagrant to be able to build with gcc 4.7 etc.

I did:
# make sure I am up to date with master
git checkout master
git pull
# start vagrant
vagrant up
# build
vagrant ssh -c "cd /home/ubuntu/renjin && mvn clean install"

However, the gcc-bridge-compiler tests fails:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.renjin.gcc.cpp.CppClassTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.3 sec - in org.renjin.gcc.cpp.CppClassTest
Running org.renjin.gcc.GimpleCompilerTest
Tests run: 139, Failures: 0, Errors: 2, Skipped: 6, Time elapsed: 20.916 sec <<< FAILURE! - in org.renjin.gcc.GimpleCompilerTest
printf(org.renjin.gcc.GimpleCompilerTest)  Time elapsed: 0.917 sec  <<< ERROR!
java.lang.reflect.InvocationTargetException: null
        at org.renjin.gcc.GimpleAssert.assertStringsEqual(GimpleAssert.java:47)
        at org.renjin.gcc.printf.test_types(printf.c:966)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.renjin.gcc.AbstractGccTest.compileAndTest(AbstractGccTest.java:120)
        at org.renjin.gcc.GimpleCompilerTest.printf(GimpleCompilerTest.java:1258)

unsignedToSigned(org.renjin.gcc.GimpleCompilerTest)  Time elapsed: 0.157 sec  <<< ERROR!
java.lang.reflect.InvocationTargetException: null
        at org.renjin.gcc.GimpleAssert.assertTrue(GimpleAssert.java:39)
        at org.renjin.gcc.to_signed.test_casting(to_signed.c:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.renjin.gcc.AbstractGccTest.compileAndTest(AbstractGccTest.java:120)
        at org.renjin.gcc.GimpleCompilerTest.unsignedToSigned(GimpleCompilerTest.java:858)

Running org.renjin.gcc.Dqrdc2Test
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec - in org.renjin.gcc.Dqrdc2Test
Running org.renjin.gcc.ProvidedVarTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in org.renjin.gcc.ProvidedVarTest
Running org.renjin.gcc.UnsignedTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in org.renjin.gcc.UnsignedTest
Running org.renjin.gcc.TrampolineClassTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec - in org.renjin.gcc.TrampolineClassTest
Running org.renjin.gcc.IntTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.renjin.gcc.IntTest
Running org.renjin.gcc.PackageTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in org.renjin.gcc.PackageTest

Results :

Tests in error: 
  GimpleCompilerTest.printf:1258->AbstractGccTest.compileAndTest:120 ? InvocationTarget
  GimpleCompilerTest.unsignedToSigned:858->AbstractGccTest.compileAndTest:120 ? InvocationTarget

Tests run: 149, Failures: 0, Errors: 2, Skipped: 6


Any suggestions for what I should do to get past this?

Best regards,
Per

Alexander Bertram

unread,
Dec 29, 2018, 6:32:02 PM12/29/18
to Renjin
I'm getting the same errors when I build with Vagrant on my machine.

The reason for the test failure is not obvious but I will try to look more closely in the coming week.

-Alex

Per Nyfelt

unread,
Jan 1, 2019, 11:08:57 AM1/1/19
to Renjin
Thank Alex,

I excluded the test for now:
vagrant ssh -c "cd /home/ubuntu/renjin && mvn clean install -Dtest=\!GimpleCompilerTest -DfailIfNoTests=false"

And managed to get a bit further. I had to install make and unzip (not in the Vagrant file - will submit suggestions to the docs on this later once I've managed to build everything).

It now fails on "Renjin Standalone Platform-independent distribution" in the Smoke test for generic distribution:
.. snip
> # Verify that parsing multi-line statements works...
> v1 <- 91; v2 <- 9; v3 <- 10;
> stopifnot(v3 == 10)
> 
> # And that we can exit cleanly...
> q()
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb75c909a, pid=9522, tid=0xb7528700
#
# JRE version: OpenJDK Runtime Environment (8.0_191-b12) (build 1.8.0_191-8u191-b12-0ubuntu0.16.04.1-b12)
# Java VM: OpenJDK Server VM (25.191-b12 mixed mode linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x6209a]  _IO_wsetb+0x1a
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/ubuntu/renjin/dist/generic/target/verify/renjin-1.0.0-SNAPSHOT/hs_err_pid9522.log
#
# If you would like to submit a bug report, please visit:
#
Aborted (core dumped)
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 134 (Exit value: 134)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

I tried removing and installing the JDK again (saw some posts on Stackoverflow that claimed this to be a solution for 134 exit codes) but I get the same problem.

Any ideas on this one?

Best regards,
Per

Bertram, Alexander

unread,
Jan 2, 2019, 7:04:13 AM1/2/19
to renji...@googlegroups.com
Per, 
I think I managed to fix it in this branch:

The compiler problems seem to arise from using a 32-bit VM versus a 64-bit VM. I think GCC produces slightly different output under a 32-bit system and our GCC-bridge doesn't handle it correctly. So i just swapped out the vagrant box with a 64-bit VM and everything works again.

Alex

--
You received this message because you are subscribed to the Google Groups "Renjin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to renjin-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alexander Bertram
Technical Director
BeDataDriven BV

Web: http://bedatadriven.com
Email: al...@bedatadriven.com
Tel. Nederlands: +31(0)647205388
Skype: akbertram

Per Nyfelt

unread,
Jan 2, 2019, 3:01:29 PM1/2/19
to Renjin
Very nice! Thanks Alex!

One minor thing: The Vagrant file needs unzip as well e.g.
config.vm.provision :shell, inline: "apt-get update && apt-get install openjdk-8-jdk maven make gcc-4.7 gcc-4.7-plugin-dev gfortran-4.7 g++-4.7 gcc-4.7.multilib g++-4.7-multilib unzip -y"

After adding that I managed to build everything in the downloader-fixes branch!

I am very happy now, thanks again!

Regards,
Per

Bertram, Alexander

unread,
Jan 11, 2019, 3:17:01 AM1/11/19
to renji...@googlegroups.com
Great, and thanks for the tip on "unzip." This is now merged into master and released.

Best,
Alex
Reply all
Reply to author
Forward
0 new messages