Building Cyanogenmod from source - recipe for target failed (libnativehelper.so) - android-source

I'm getting the following error about an hour into my build of Cyanogenmod 12.1 for hlte, using the latest repo checkout. I am using Debian testing, have all dependencies installed as listed in Google's build guide and am using OpenJDK 7. I also have all proprietary files under vendor/samsung. What am I missing or what direction should I look in to solve this problem?
...
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:44: recipe for target '/home/james/android/cm/out/host/linux-x86/obj32/lib/libnativehelper.so' failed
make: *** [/home/james/android/cm/out/host/linux-x86/obj32/lib/libnativehelper.so] Error 1

Related

Not able to compile swift on Ubuntu 18.04

I installed swift toolchain using instructions from swift.org. While compiling helloworld code I am getting below error.
warning: 'helloworld': failed loading cached manifest for 'helloworld': disk I/O error
error: 'helloworld': Invalid manifest
<unknown>:0: error: unable to open output file '/usr2/xyz/.cache/clang/ModuleCache/IJ5GUC7XMAO5/SwiftShims-1TLN9ZL6HKTHR.pcm': 'No such file or directory'
<unknown>:0: error: could not build C module 'SwiftShims'
I tried removing '/usr2/xyz/.cache/clang/ModuleCache', but did not work. Please help in resolving this issue.

Tuist generate fails with Xcode 13

After updating Xcode to 13.0, I get an error when trying to run the command:
tuist generate
The error:
The 'swiftc' command exited with error code 1 and message:
error: link command failed with exit code 1 (use -v to see invocation)
ld: framework not found ProjectDescription
This command was working before the update.
I tried updating tuist to the latest version, 1.50, but that doesn't work
tuist update solves the problem

I am trying to generate hal using hidl-gen tool from this http://devarea.com/android-hidl-and-project-treble/#.XJyyf0PhVuQ

make hidl-gen -j64
build/core/binary.mk:925: warning: ignoring old commands for target out/target/product/generic_x86/obj/STATIC_LIBRARIES/libv8_intermediates/src/base/atomicops_internals_x86_gcc.o'
Starting build with ninja
ninja: Entering directory.'
ninja: error: unknown target 'hidl-gen', did you mean 'idegen'?
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
HIDL is supported from Android 8

compiling and linking is not working ubuntu 17.10/clang

I am unable to link and compile the AWS SDK with the following link error:
/usr/bin/ld: CMakeFiles/ns_api.dir/src/main.cpp.o: undefined
reference to symbol '_ZN3Aws4FreeEPv'
/usr/bin/ld: //deps/aws_sdk/aws-cpp-sdk-core/libaws-cpp-sdk-
core.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ns_api.dir/build.make:95: ns_api] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/ns_api.dir/all]
Error 2
make: *** [Makefile:84: all] Error 2
Additionally, it seems that I need to specify the build directory with aws-sdk-cpp_DIR even though I did a make install - should this not have placed the lib in the systems lib dir?
I installed the package as follows:
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING="FALSE" -DBUILD_ONLY="s3" . && make install -j8
I am under the impression that this issue should not be present given I following the install instructions exactly within an isolated ubuntu environment
Please advise
Thank you very much!
Wanted to follow up here with my own answer:
target_link_libraries( ... aws-cpp-sdk-core aws-cpp-sdk-s3 ... )
was required in my cmake file
adding the core lib for the linker was not required in other installations, so this a ton of caused confusion on my end.

Error while building binutils 2.21.1a on Solaris

I'm trying to build binutils 2.21.1a from http://ftp.gnu.org/gnu/binutils on Solaris sun4u sparc SunOS 5.10. I am using gcc version 4.0.2. When I built this is the error:
cc1: warnings being treated as errors
compress.c: In function 'bfd_compress_section_contents':
compress.c:100: warning: implicit declaration of function 'compressBound'
make[2]: *** [compress.lo] Error 1
make[2]: Leaving directory `/nfs/netapp0/user/home/hart/downloads/binutils-2.21.1/bfd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/nfs/netapp0/user/home/hart/downloads/binutils-2.21.1/bfd'
*** Error code 2
make: Fatal error: Command failed for target `all'
I added the --disable-werror to the configure line to try to bypass it and hopefully continue the build. Unfortunately this did not work either and I got this new, related, error at link time:
Undefined first referenced
symbol in file
compressBound ../bfd/.libs/libbfd.a(compress.o)
ld: fatal: Symbol referencing errors. No output written to size
collect2: ld returned 1 exit status
I have searched for an existing issue but I have found nothing related. Any ideas? I prefer to use this version of binutils, but if you know of a version that builds OK on this platform with gcc 4.0.2 specifically please let me know.
I finally found the issue was indeed filed as a BUG. The workaround is to add --without-zlib to the configure script or install an up to date version of zlib on the system.