arm-linux-androideabi stl compile error - c++

I'm currently trying to build the android version of google breakpad on a linux machine. But it seems I'm having some issues getting the stl to be properly referenced.
I get past the configure step running ..
./configure --host=arm-linux-androideabi --disable-processor
--disable-tools
For output of this see config.log
My environment has the following variables set ..
CPP=arm-linux-androideabi-cpp
AS=arm-linux-androideabi-as
AR=arm-linux-androideabi-ar
CXX=arm-linux-androideabi-g++
CC=arm-linux-androideabi-gcc
LD=arm-linux-androideabi-ld
CFLAGS=--sysroot=/home/desktop/Development/android-ndk-r9d/platforms/android-9/arch-arm
CPPFLAGS=--sysroot=/home/desktop/Development/android-ndk-r9d/platforms/android-9/arch-arm
CXXFLAGS=--sysroot=/home/desktop/Development/android-ndk-r9d/platforms/android-9/arch-arm
SYSROOT=/home/desktop/Development/android-ndk-r9d/platforms/android-9/arch-arm
PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:.:/home/desktop/Development/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin
NDK_ROOT=/home/desktop/Development/android-ndk-r9d
NDK=/home/desktop/Development/android-ndk-r9d
When I run make -j4 I get the following errors..
src/client/linux/crash_generation/crash_generation_client.cc:34:21:
fatal error: algorithm: No such file or directory compilation terminated.
There are more similar errors related to stl (full output here). So my question is how do I get this to build with those included. I don't work in linux much so please try to be explicit with any answers.
Thanks

I added the following flags and reran config and then the compile succeeded.
CPPFLAGS=--sysroot=/home/desktop/Development/android-ndk-r9d/platforms/android-9/arch-arm -I /home/desktop/Development/android-ndk-r9d/sources/cxx-stl/stlport/stlport
LDFLAGS=-L /home/desktop/Development/android-ndk-r9d/sources/cxx-stl/stlport/libs/armeabi
LIBS=-lstlport_static

Related

*** internal error: unable to open jobserver semaphore '3,4': (Error 2: The system cannot find the file specified. ). Stop

I am trying to compile an existing qt application's code using mingw compiler.
During compilation I am getting an error "*** internal error: unable to open jobserver semaphore '3,4': (Error 2: The system cannot find the file specified. ). Stop".
My current project is a makefile based project. Here I have one make file (parent.mk) that compiles all primary modules and then
parent.mk
compilation steps
.
.
.
make $QT_CODE_DIR
Here in this QT code directory I have another makefile (child.mk) which has following content:
child.mk
cd "qtcode_compilation_out_dir"
qmake.exe "product.pro" -r -spec win32-g++
CONFIG+=release
mingw32-make -w
If I try to run the make command manually for QT code then it works fine.
#Alexander: Thanks for the suggestion.
Please suggest if anyone has any idea about it.
Thanks.
Finally, I found out the exact reason of the problem and solution as well.
Reason for failure:
The compilation command that I am using is "make" which is been aliased to "make -j2"and along with "mingw32-make -w" it was producing the error because mingw32-make is an obsolete make command and it doesn't support multi threaded compilation.
Solution:
I just replaced the mingw32-make with make.

LNK1181 error when compiling V8 engine on Win10

I'm following this guide on building V8 but I am hitting some issues on the compilation step. I am running Windows 10 x64. I am trying to compile with options to embed the engine also.
Running the following command:
ninja -C out.gn/x64.release
Gives me this error:
ninja: Entering directory `out.gn/x64.release'
[1/471] LINK mksnapshot.exe mksnapshot.exe.pdb
FAILED: mksnapshot.exe mksnapshot.exe.pdb
C:/Workspace/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./mksnapshot.exe /PDB:./mksnapshot.exe.pdb #./mksnapshot.exe.rsp
LINK : fatal error LNK1181: cannot open input file 'comdlg32.lib'
ninja: build stopped: subcommand failed.
Now I believe I have narrowed down the error to looking for the .lib files in the wrong directory. I have (had) multiple versions installed, so there were multiple folders in my Windows Kit install.
Windows Kits/10/Lib/10.0.16299.0
Windows Kits/10/Lib/10.0.15xxx.0
If I dragged and dropped the comdlg32.lib file from 10.0.16299.0 into the 10.0.15xxx.0 directory then the error changed to a LNK1181 error with a different input file. I did this a few times but I was unsure if this was going to cause issues with different versions and there was probably going to be a lot.
I uninstalled the 10.0.15xxx.0 version which left behind the folder I mentioned, so I removed that and after doing so I have started getting the LNK1181 error with a different input file (advapi32.lib I assume the very first file it can't find). This is how I came to the conclusion about the path being incorrect.
So I have tried a few things to change the path (I hoped just uninstalling the old version would fix it) such as:
Uninstalling the old version.
Going through registry entries to see if I can find an install path or something using that path, which I didn't. I did notice that there was still installation and data in the registry for the 10.0.15xxx.0 install, I might try deleting that from the registry directly as a last resort?
I have tried to explicitly set the path by setting <TargetUniversalCRTVersion>10.0.16299.0</TargetUniversalCRTVersion> in this file: C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\uCRT.props
I have never used Ninja before so I tried looking for a way to set some kind of lib-path in the command but couldn't really find anything.
I looked through the python scripts being executed to try and locate something to do with the libs path but couldn't see anything.
I would be grateful for any help and suggestions. Thanks.
You can try to compile v8 using Visual Studio as explained here: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#using-the-visual-studio-ide
By running the following commands:
$ gn gen --ide=vs out.gn/x64.release
$ cd out.gn/x64.release
$ msbuild all.sln
You can see a full example here: https://github.com/phpv8/v8js/issues/272#issuecomment-262848754
Apparently this method is not officially supported anymore, but I had the same problem as you have and this solved the issue for me.
Note that after this I had another issue, the unit tests failed to be compiled due to a linking error, but I had the necessary libraries to use v8. So there may be deeper problem that is causing all of this that I'm missing.
Edit:
Also, you could try to set the following parameters with gn args:
visual_studio_path = "..."
visual_studio_version = "2017"
wdk_path = "..."
windows_sdk_path = "C:\Program Files (x86)\Windows Kits\10"
To set those parameters, do:
gn args out.gn/x64.release
This will open a text editor where you can write the extra parameters you are interested in.
To see the full list of parameters you can specify:
gn args --list out.gn/x64.release
I was following this guide https://medium.com/dailyjs/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4 and also ran into the error
LINK1181: cannot open input file 'advapi32.lib'
I'm pretty sure it was because I had the wrong versions of the Windows 10 SDK. Similar to you I had versions:
Windows Kits/10/Lib/10.0.10240.0
Windows Kits/10/Lib/10.0.16299.0
But according to https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#Setting-up-Windows (Which I think is relevant) you need version 10.0.15063.0
After installing version 10.0.15063.0 (with the visual studio installer) to
Windows Kits/10/Lib/10.0.15063.0
I was able to continue with the build.

Tensorflow C++ API guide examples on Windows

I built tensorflow with VS2015 and I was able to run some examples,
as tf_tutorials_example_trainer and label_image.
Then I tried to run the samples here. I was able to compile and start the example.cc but when reaching the line
Scope root = Scope::NewRootScope();
I get this error:
Op type not registered 'NoOp' in binary running on DESKTOP-S5QHRCE.
Make sure the Op and Kernel are registered in the binary running in this process
What am I missing?
I found this.Thanks to Joe, who explains how to use the /WHOLEARCHIVE option to fix the issue.To avoid out of memory error during linking if using Optimize for debugging (/DEBUG) option, do msbuild /p:Configuration=Release youproject.vcxproj in a command prompt.

Compiling Qt 5.3.1 from source error at qprintsupport

I'm not sure whether or not this question has a causality with my previous question.
So, I compiled Qt 5.3.1 from source with MinGW 4.8.2. The build stopped at qtbase/src/printsupport directory, as you can see the image below:
Is it a bug or something at qtbase/src/printsupport/kernel/qprintengine_win.cpp file? Then, should I just report it to the developer?
Look here it give you a hint. Probably somewhere you use this key -Werror in make files implicitly or explicitly when start compilation with gcc. If I correct understand error in that switch operation must be default: statement or case PPK_CustomBase: statement.
miraiE,
If you will notice in your output: cc1plus.exe: all warnings being treated as errors
This is, as was mentioned before, a warning that is stopping the compile process as an error.
You should be able to run you configure.bat script again, with the option -no-warnings-are-errors.
Then re-run your make.exe to get past this, and other warnings, from stopping the build.
Details of the specific configure options below:
../qtbase-opensource-src-5.3.1/configure --help |grep -i warn
-silent ............ Reduce the build output so that warnings and errors
-no-warnings-are-errors Make warnings be treated normally
-warnings-are-errors Make warnings be treated as errors
I hope this helps!

How to build cppcheck tool in gcc compiler?

I have downloaded cppcheck tool and build it.
Now am facing the problem that cppcheck command not found.
Is there any mistake..suggest me the steps..
I tried in gcc compiler as following:
> cd /home/tcsujth/Desktop/cppcheck-1.46.1/
> g++ -o cppcheck -Ilib cli/*.cpp lib/*.cpp
> ./cppcheck
SYNTAX----------
cppcheck: error: could not find or open any of the paths given.
Segmentation fault (core dumped)
> cppcheck --version
cppcheck: Command not found.
I am a Cppcheck developer.
I assume that the g++ command finish without errors.
The "cppcheck: error: could not find or open any of the paths given" indicates that the compile was successful. It is an error that cppcheck writes if it doesn't find any source code to analyse. You must provide the path to your source code. If you provided a path then it seems something is wrong with the given path.
The segmentation fault seems interesting. Can you reproduce it with the latest Cppcheck? Feel free to report it here: http://sourceforge.net/apps/trac/cppcheck/ with some details about how it can be reproduced.
The "cppcheck: Command not found" simply means that the shell can't find cppcheck (it is not located in any path given by the PATH environment variable).
Best regards,
Daniel
I was also facing the same issue most of the time you give path including the folder of your project itself try proving path one folder behind:
Like:(assuming your project resides in "projectfolder"
instead of this-
D:\myfolder\projectfolder
try-
D:\myfolder\