I built a Unity Project for Tizen. Ran in an emulator in Tizen Studio, but I get this in the logs:
ERROR / AUL_PAD ( 3370 : 3370 ) : launchpad_loader.c: main(713) > dlopen failed(/opt/usr/apps/com.example.nameapp.test/bin/nameapp: cannot open shared object file: No such file or directory). Please complile with -fPIE and link with -pie flag
How do I fix it?
Executable file that can be your entry point of your app must be compile with -fPIE and -pie flag if you want to use it with dlopen() and dlsym().
Basically, tizen system should start app with "launchpad" deamon.
"launchpad" deamon fork candidate process for future launching.
and this candidate process use dlopen() and dlsym() for open and start the executable of your application.
so your executable file must be build with -fPIE and -pie flag.
I don't know How to code is builded with Unity.
If you use Tizen Studio, you can check -fPIE is exist in All options in project -> properties -> c/c++ build -> Settings -> C/C++ compiler and also check -pie is exist in All options in C/C++ linker
Related
Any help with swift language code completion on coderunner, would be much appreciated.
On the website https://coderunnerapp.com/ its claimed that it does support it, but not sure if I need to enable it explicitly or if I'm missing something.
Setup Active Directory
In Terminal run
xcrun swift --version
If you see the version information, you’re all set. If the command fails with xcrun: error: unable to find utility "swift", not a developer tool or in PATH, you need to set the active developer directory:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Create a Swift Template in CodeRunner
Open Preferences and switch to the Languages tab. Create a new entry in the list and name it “Swift”.
In the “Run Command:” text field, enter this command:
xcrun swift -sdk $(xcrun --show-sdk-path --sdk macosx) -i $filename
The “Code Template:” field should contain the code you want to start with when you create a blank Swift file in CodeRunner.
In the “File Extension” field, enter swift.
*** Internal Builder is used for build ****
g++ -O0 -g3 -Wall -c -fmessage-length=0 -osrc\first.o ..\src\first.cpp
Internal Builder: Exec error:Launching failed
Build error occurred, build is stopped
Time consumed: 62 ms.
I am getting the above error in eclipse console when I tried to build my first "hello world" CPP program. Below are the steps I followed.
Installed Eclipse Europa.
Installed MinGW.
Open Eclipse goto window->preferences->c/C++->NEW CDT project wizard-> changed the Tool chain as "MinGW GCC".
When I opened the eclipse workspace manually there is no exe generated for the program.
My PATH variable in the project properties has "C:\MinGW" as value.
I searched much in net and still this "Launch Failed No Binaries" did not go off.
Please help...
"Launch failed No Binaries" means the program is not compiled.So this is the problem
related with MinGW GCC.Check you gave all the environmental variables necessary for the MINGW
correctly.
MoreOver I Suggest CodeBlocks IDE as a replacement.It is much Better than eclipse for c++
The link is CodeBlocks Download Link
I have a Beaglebone (Rev: A6) and i want to develop C/C++ program in windows 7 using Eclipse and then transfer executable in the board. But i'm having trouble setting up compiler/debugger/toolchain needed for Beaglebone. Searching the internet only gives me how to setup environment in Linux like installing 'arm-linux-gnueabi', setting up the paths to 'includes' etc. I need a step by step instruction to set up the environment in Eclipse in a windows machine. Can anyone help ?
I have tried these steps:
1. I have GNUARM installed on windows.
2. On eclipse IDE i open a C++ project with Corss GCC.
3. From project -> properties -> C/C++ build -> settings i add 'arm-elf-' to every cross compiler command.
4. From the GNUARM installation directory i add few path to '.../include/' in the 'C++ General -> paths and symbos'.
my 'build all' shows something as below:
10:32:20 **** Build of configuration Debug for project h ****
make all
Building file: ../src/hello.cpp
Invoking: Cross G++ Compiler
arm-elf-g++ -I"C:\GNUARM\include\c++\4.1.1" -I"C:\GNUARM\include\c++\4.1.1\arm-elf" - I"C:\GNUARM\include\c++\4.1.1\backward" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP - MF"src/hello.d" -MT"src/hello.d" -o "src/hello.o" "../src/hello.cpp"
Finished building: ../src/hello.cpp
Building target: h
Invoking: Cross G++ Linker
arm-elf-g++ -L"C:\GNUARM\lib\gcc\arm-elf\4.1.1\include" -o "h" ./src/hello.o
Finished building target: h
10:32:23 Build Finished (took 2s.967ms)
It is simple 'Hello world' printing program. From the project explorer 'Debug->src->hello.o -[arm/le]' i copy it and when run on beaglebone with
chmod ugo+x hello.o
./hello.o
-sh: ./hello.o: cannot execute binary file
the above massage is printed. I don't know what i did wrong. Perhaps the ARM environment in eclipse is set up incorrectly.
Isn't hello.o the pre-linked object file (just the compiled content of hello.cpp)? It doesn't contain the startup code or any library functions. The linker adds those to produce the final output.
Don't you want to run the linker ouput file h (which should already be executable)?
i got my answer here. http://www.acmesystems.it/foxg20_eclipse_windows_c. CodeSourcery was the toolchain that i was looking for and this also explains how to setup the corss compiling environment.
First, I am running a ubuntu 12.04 x86 virtual machine hosted on win8. I am compiling a c/c++ library to my android app.
After I use ndk-build in the directory, It seems the library and module were built successfully. And I can also see the .so file under libs/armeabi/ . However, when I import my project to eclipse, it always gives error that says can't find the lib, named event in this case. And I did unzip the apk file and find that the lib/armeabi/ .so is not packed in the apk file.
Below are detailed info, hope anyone can help me.
NDK build:
simon#ubuntu:~/projects/apps/latest/tgs-android/jni$ ndk-build
/home/simon/Android/android-ndk-r8c/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 11 a in /home/simon/projects/apps/latest/tgs-android
ndroidManifest.xml
Compile++ thumb : swift <= NativeLib.cpp
Compile++ thumb : swift <= sha1.cpp
Compile++ thumb : swift <= compat.cpp
Compile++ thumb : swift <= sendrecv.cpp
Compile++ thumb : swift <= send_control.cpp
Compile++ thumb : swift <= hashtree.cpp
Compile++ thumb : swift <= bin.cpp
Prebuilt : libevent.a <= jni/libevent2/lib/
Prebuilt : libstlport_static.a <= <NDK>/sources/cxx-stl/stlport/libs/armeabi/
SharedLibrary : libevent.so
Install : libevent.so => libs/armeabi/libevent.so
Can find it
simon#ubuntu:~/projects/apps/latest/tgs-android/jni$ ls ../libs/armeabi/
libevent.so
Another question I have is, when I tried using aapt a to add the .so lib to the .apk file, it seems succeed, however when I use adb install to install it on my device. It prompts out the:
simon#ubuntu:~/projects/apps/latest/tgs-android/bin$ adb install IntroActivity.apk
2871 KB/s (1089288 bytes in 0.370s)
pkg: /data/local/tmp/IntroActivity.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
simon#ubuntu:~/projects/apps/latest/tgs-android/bin$
But I think the apk file has already been signed by eclipse in debug mode.
simon#ubuntu:~/projects/apps/latest/tgs-android/bin$ jarsigner -verify IntroActivity.apk
jar verified.
Warning:
This jar contains unsigned entries which have not been integrity-checked.
Re-run with the -verbose and -certs options for more details.
Any help is appreciated !
THANKS IN ADVANCE!
You can fix this by performing the following steps in Eclipse:
1.
Window -> Preferences -> C/C++ -> Build -> Settings
Select CDT GNU C/C++ Error Parser
In the Error Parser options at the bottom, add a new entry with the following contents:
Severity: Warning
Pattern: (.*?):(\d+): Android NDK: WARNING:(.*)
File: $1
Line: $2
Description: $3
2.
After that move this new item up just above its's upper one : (.*?):(\d+):(\d+:)? (.*)
This is discussed here : https://code.google.com/p/android/issues/detail?id=39752
I am trying to debug clang using eclipse. I have put a break point in clang/lib/lex/preprocessor.cpp at the preprocessor's constructor.
I have set a "test.c" file as an argument in the debug configurations.
Went to Run-> Debug As-> Local C/C++ Application.
It asked "Choose local application to debug". I chose "clang" and clicked OK.
It started building the code. build completed.
Stopped at main() in the debug window. (No source available for main())
After some step overs, it says "terminated: gdb Debugger (Exited. Exit code=255)"
I am not taken to the clang code (preprocessor code). can someone please tell me how to debug the clang code.? I want to see the code flow in clang. and how clang is constructing the AST.
Clang binary in fact contains two apps: driver and compiler frontend itself. The latter is executed via -cc1 cmdline option. So, just add -v to clang command line to see the actual sequence of tool invocation, grab the frontend cmdline (the one containing -cc1) and use this cmdline for debugging.
Had the same problem - you are missing the -g flag (enable debug info) when you are building your binaries.
When running the cmake run it with the CMAKE_BUILD_TYPE option:
cmake -G "Eclipse <CDT_Version> - Unix Makefiles" -D_ECLIPSE_VERSION=<eclipse_version> -DCMAKE_BUILD_TYPE=Debug <llvm_source_path>
example :
cmake -G "Eclipse CDT4 - Unix Makefiles" -D_ECLIPSE_VERSION=4.4 -DCMAKE_BUILD_TYPE=Debug ../llvm/
hope that this helps.