I’m trying to compile react-native-webgl module. I’ve spent a lot of time during last week trying to start my first serious react-native app. Unfortunately I was not able to compile my example app.
I want to warn all readers that I’m also NixOs newbie and not an expert of C++ compilation process, so I’m probably writing a lot of stupid things here.
ENVIRONMENT
This module comes with this android build file (I’m not really familiar with android build stack yet):
I’m using FHS and android related packages in my environment. Here is my react-native-webgl.nix which is nothing more than androidsdk + buildTools 25.0.1 and simple autolicensing patch:
To build I’m creating simple react-native project, but it doesn’t really matter in this context as I’ve tracked problems down to compiling and linking gl bindings of react-native-webgl.
RESULTS
During armeabi-v7a compilation I’m getting:
Bad value
from
arm-linux-androideabi-strip
If I try to compile only for x86 architecture I’m getting error from linking step:
The first thing you need to find out, is what parameter does arm-linux-androideabi-strip receive, when it prints that value. One trick I use is strace -s 512 -e execve -f followed by the build command. This will print all commands with all arguments that are executed. From there you will also see the binary that is given to the strip command. You can use readelf and nm to inspect the binary. The binary might be broken.
For the link command (ld), you should check where it adds both -shared and -static parameter. You can also use strace again to get the whole executed command.