Error when build LineageOS: "make: *** [ninja_wrapper] Error 1" - build

frameworks/av/camera/cameraserver/Android.mk:18: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
find: ‘/home/xuanan/android/lineage/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates’: No such file or directory
Starting build with ninja
ninja: Entering directory `.'
[ 0% 14/48263] Lex: aidl <= system/tools/aidl/aidl_language_l.ll
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -o/home/xuanan/android/lineage/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Aborted (core dumped)
[ 0% 14/48263] target Java: libprotob...tobuf-java-nano_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 0% 14/48263] target Java: libphonen...number-platform_intermediates/classes)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/xuanan/android/lineage'
I am trying to to build LineageOS for my device A6020. I did everything mention in official lineageos build guide for my device. But at the building step i encounter above error, at only less than 2 minutes after i enter brunch A6020. I would really appreciate if anyone can help me out since this is my school project. English is not my main language but i hope you guys can understand me. Thanks in advance.
picture of terminal when encounter error

This will do the trick:
export LC_ALL=C
Add it to your bashrc file or equivalent.

I made it past this error by adding the following variables before building.
export LC_ALL=C
This error occurred later
FAILED: setup-jack-server when building LineageOS
I solved by edit java.security file under /etc/java-8-openjdk/security/
https://stackoverflow.com/a/72038963/10941856

Related

Can't build OMNeT++ Project

I can't build the basic project configuration and I am always getting this message in the console. I have set PREFER_CLANG=no as well and still getting this error.
16:09:44 **** Build of configuration debug for project Ihab Project ****
make MODE=debug all
Computer.cc
Creating executable: out/gcc-debug//Ihab
g++.exe: error: Project_dbg.exe: No such file or directory
make: *** [Makefile:95: out/gcc-debug//Ihab] Error 1
"make MODE=debug all" terminated with exit code 2. Build might be incomplete.
16:09:46 Build Failed. 1 errors, 0 warnings. (took 1s.705ms)
I have discovered the problem, you can't put Spaces when you name your Project. I have renamed it to be IhabTest instead of Ihab Project.
19:44:44 **** Build of configuration debug for project IhabTest ****
make MODE=debug all
Computer.cc
Creating executable: out/clang-debug//IhabTest_dbg.exe
19:44:47 Build Finished. 0 errors, 0 warnings. (took 3s.826ms)

Error using Cygwin: "collect2: fatal error: ld terminated with signal 11 [Segmentation fault]"

I'm trying to use cygwin to download openslide (building natively on Windows) on a Windows 10 x64 system. I ran into an error earlier relating to chk_fail and set the line in the build file with -D_FORTIFY_SOURCE to 0 instead of the default (2). You can probably tell by now I don't really know what I'm doing. But I got a new error below relating to a memory error from what I've read. I tried deleting the whole package folder including the makefiles and object files, then clone from Github again and rebuild, but it didn't work. Can anyone give me pointers about what's happening here and how to fix it? It would be much appreciated.
Scanning dependencies of target ziptool
[ 90%] Building C object src/CMakeFiles/ziptool.dir/ziptool.c.obj
[ 90%] Linking C executable ziptool.exe
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
make[2]: *** [src/CMakeFiles/ziptool.dir/build.make:109: src/ziptool.exe] Error 1
make[2]: *** Deleting file 'src/ziptool.exe'
make[1]: *** [CMakeFiles/Makefile2:442: src/CMakeFiles/ziptool.dir/all] Error 2
make: *** [Makefile:161: all] Error 2
Failed: make $parallel (line 417)
I solved this problem. Firstly, don't even bother to build this package using Cygwin. It won't work because of dependency issues and there is no record for version control in the package README.
For anyone else who has this problem like I did, you can download the latest versions of the code here: https://github.com/openslide/openslide-winbuild/releases and pick the latest one.
I first pip installed openslide-python. Then I moved openslide-win64-20171122 (from Github) into anaconda3/site-packages (not necessary, but nice), and then from anaconda3/site-packages/openslide I opened lowlevel.py.
In lowlevel.py, you need to add the following lines:
(in the beginning after importing libraries)
os.environ['PATH'] = "path/to/openslide-win64-20171122/bin" + ";" + os.environ['PATH']
You can also change this line:
if platform.system() == 'Windows':
_lib = cdll.LoadLibrary('libopenslide-0.dll')
to this:
if platform.system() == 'Windows':
_lib = cdll.LoadLibrary(util.find_library("libopenslide-0.dll"))
so that it searches for the libopenslide-0.dll file. Then don't forget to add from ctypes import util at the beginning.

Gradle and Cmake failing to find cpp file that is definitely there

I run gradle to build an android .aar and it reports that it can't find a file, but the file definitely is there.
$ ./gradlew.bat assembleRelease
> Task :webrtc-native:externalNativeBuildRelease FAILED
Build mrwebrtc arm64-v8a
ninja: error: 'C:/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp', needed by 'CMakeFiles/mrwebrtc.dir/C_/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp.o', missing and no known rule to make it
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':webrtc-native:externalNativeBuildRelease'.
> Build command failed.
Error while executing process C:\Users\User\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe with arguments {--build C:\Developer\Microsoft-MRWebRTC\tools\build\android\webrtc-native\.externalNativeBuild\cmake\release\arm64-v8a --target mrwebrtc}
ninja: error: 'C:/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp', needed by 'CMakeFiles/mrwebrtc.dir/C_/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp.o', missing and no known rule to make it
But the file C:/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp is definitely there.
$ cd C:/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/
User MSYS /c/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop (master)
$ ls
data_channel_interop.cpp global_factory.cpp interop_api.cpp local_video_track_interop.cpp remote_audio_track_interop.cpp transceiver_interop.cpp
external_video_track_source_interop.cpp global_factory.h local_audio_track_interop.cpp peer_connection_interop.cpp remote_video_track_interop.cpp
Could anyone help? I am kind of running out of ideas on this.
I discovered it was because I had 'caseSensitive' flags enabled on some of my directories. Be careful, this is a new feature of WSL2 and there are some peculiarities where you may be enabled in without realizing. Windows cmake cannot traverse directories that have this flag enabled on them.
Read about it here:
https://devblogs.microsoft.com/commandline/per-directory-case-sensitivity-and-wsl/

opencv_perf_stitching_Release.gch not generated by cmakefiles

I am trying to configure openCV with codeblocks but It got stuck during mingw32-make step, giving me this error:
[ 94%] Generating
perf_precomp.hpp.gch/opencv_perf_stitching_Release.gch
C:/openCV/opencv/build/x86/mingw/modules/stitching/perf_precomp.hpp:1:0:
fatal error: can't creat e precompiled header
C:/opeCV/opencv/build/x86/mingw/modules/stitching/perf_precomp.hpp.gch/opencv_perf_stitching_Release.gch:
No such file or directory #ifdef __GNUC__ ^ compilation terminated.
modules\stitching\CMakeFiles\pch_Generate_opencv_perf_stitching.dir\build.make:61:
recipe for tar get
'modules/stitching/perf_precomp.hpp.gch/opencv_perf_stitching_Release.gch'
failed mingw32-make[2]: ***
[modules/stitching/perf_precomp.hpp.gch/opencv_perf_stitching_Release.gch]
E rror 1 CMakeFiles\Makefile2:6569: recipe for target
'modules/stitching/CMakeFiles/pch_Generate_opencv_pe
rf_stitching.dir/all' failed mingw32-make[1]: ***
[modules/stitching/CMakeFiles/pch_Generate_opencv_perf_stitching.dir/all]
Er ror 2 Makefile:159: recipe for target 'all' failed mingw32-make:
*** [all] Error 2
I am unable to resolve it!
I am using windows 7 32bit
I met the similar problem that may be caused by cmd input limitation.
The cmd input limitation in win7 is about 8000 characters and in most case that is enough.
However in opencv build,one built component (opencv_perf_stitching_Release) might break this limition due to a long executed command.Because of different folder length for different users,the cutting point in executed command is located at unfixed position.Their error messages are also totally distinctive.In my example,I got a message unrecognized command line option '-sse' but i doubt we met the same problem.
The simplest solutiuon is to reduce your building folder level.In your case,you can change your install path from C:/opeCV/opencv/ to C:/opencv/ and try again.

S-Function with c++. Build error

I'm a newbie in MATLAB. I am trying to build my modell with an example for S-Function from the matlab help. This is the sfun_counter_cpp.cpp. The source code is available in "matlabroot/simulink/src/sfun_counter_cpp.cpp" or on http://www-rohan.sdsu.edu/doc/matlab/toolbox/simulink/sfg/sfun_c++2.html.
First I build C++ S-function with the "mex" command as described here:
http://www.mathworks.de/de/help/simulink/sfg/building-c-s-functions.html.
The build is successful and the sfun_counter_cpp.mexw32 is created. After that I create an S-Function block that provides access to sfun_counter_cpp from my block diagram, click "Incremental build" and get an error message "OPUS MAKE: Don't know how to make 'sfun_counter_cpp.cppm50'. Stop."
*** Found User-Code File TestModell_usr.c from 05-Jul-2013 15:38:59
*** Found User Makefile TestModell_usr.mk from 05-Jul-2013 15:38:59
*** Optional User Variable Description File TestModell_usr.trc not available
.
### Processing Template Makefile: C:\dSPACE\matlab\rti1005\m\rti1005.tmf
### TestModell.mk which is generated from C:\dSPACE\matlab\rti1005\m\rti1005.tmf is up to date
### Building TestModell: dsmake -f TestModell.mk GENERATE_REPORT=0 EXTMODE_STATIC_ALLOC=0 TMW_EXTMODE_TESTING=0 EXTMODE_STATIC_ALLOC_SIZE=1000000 EXTMODE_TRANSPORT=0
BUILDING APPLICATION "TestModell" (Multiple Timer Task Mode)
WORK DIRECTORY "c:\MyTest"
BUILD DIRECTORY "c:\MyTest\TestModell_rti1005"
TARGET COMPILER "C:\PPCTools37"
COMPILING "TestModell.c"
COMPILING "TestModell_data.c"
COMPILING "TestModell_trc_ptr.c"
COMPILING "rtGetInf.c"
COMPILING "rtGetNaN.c"
COMPILING "C:\PROGRA~2\MATLAB~1\rtw\c\src\rt_matrx.c"
COMPILING "rt_nonfinite.c"
COMPILING "C:\dSPACE\MATLAB\RTI1005\C\rt_printf.c"
COMPILING "C:\dSPACE\MATLAB\RTI1005\C\rti_sim_engine.c"
OPUS MAKE: Don't know how to make 'sfun_counter_cpp.cppm50'. Stop.
----------------------------------------------------------------------
*** Errors occurred during make process.
*** Inspect MATLAB Command Window for details.
*** Aborting RTI build procedure for model TestModell.
----------------------------------------------------------------------
*** Stopped RTI build procedure for model: TestModell.
----------------------------------------------------------------------
The problem is solved. I set
USER_BUILD_CPP_APPL = ON
and
USER_SRCS =
USER_SRCS = sfun_counter_cpp.cpp
produces an error
< lnkppc > (E) #A0307-D Symbol: sfun_counter_cpp in file: sfun_counter_cpp.cppm50 already defined in file: sfun_counter_cpp.cppm50