I am currently using Google Breakpad in my Linux app. I built breakpad by configure&make, I am linking /src/client/linux/libbreakpad_client.a and it works fine, dump is created in case of crash.
Now I would like to also use common/linux/http_upload functions to upload dump somewhere similar way as it is done in src/tools/linux/symupload/minidump_upload but I get undefined reference to google_breakpad::HTTPUpload::SendRequest...
How to proceed? Is is not built on Linux into some library? Linking libbreakpad_client.a and libbreakpad.a does not seem to be enough. Do I need to build it somehow separately? Thanks for help.
It requires src/common/linux/http_upload.cc to be included in (for example) libbreakpad_client.a, I added that line to Makefile.am to src_client_linux_libbreakpad_client_a_SOURCES section. It seems it is not built otherwise by any configure arguments or I missed it.
Related
I'm using Debian8.7 which is installed gcc4.9.2 via apt-get.
I built glibc2.24 and gcc6.3 with --prefix=/home/me/local, that looks finished correctly, but when using these adding LD_LIBRARY_PATH=/home/me/local/lib I got an error 'segmentation fault'.
I don't have any idea to solve this problem, could you help me?
You won't be able to use custom glibc just by setting the LD_LIBRARY_PATH (e.g. your app will still use dynamic linker from old Glibc). See this question for details on how to achieve what you want. Glibc testing wiki may also be of help.
This may be a noob question, but I have been stuck trying to work out how to statically build my qt project on linux. I tried doing what it said on http://doc.qt.io/qt-5/linux-deployment.html , but I do not understand the 1st step. When I cd to the location of my qt project and run
cd /path/to/Qt
./configure -static -prefix /path/to/Qt <otherparameters>
make
it says no such file or directory. Am I misunderstanding what paths I need to use? I want to make my qt project a stand alone executable which doesnt require the computer it is on to have qt. I have read about dynamically linking the libraries, but I dont really know what to do with that either. The deploy option is greyed out in qtcreator, is there a way to use this?
Thanks
/path/to/Qt should be the path to Qt's sources, not your project's. That section of the documentation is about building Qt statically, which you must do before trying to statically link your application to Qt. For example, if you downloaded/cloned the sources to /home/jxb458/qt5, then you'd replace /path/to/Qt with that:
cd /home/jxb458/qt5
./configure -static -prefix /home/jxb458/qt5/qtbase
make
Static linking is great when it works, but it can be an effort - I have found especially when using GUI. As Mitch said you need to actually re-build the Qt source code
I made some notes back when I was building statically quite a bit here: Notes on static building (derived from many sources) they should at least point you in the right direction - you can probably ignore the part about installing Ubuntu - the notes assume a new install.
However I have more recently returned to the dynamic linking deployment since I feel this is a better way to deploy now. You don't need to install Qt on the target machine you just need to collect the qt dlls and copy them with your application (using ldd executable-name which produces a list of dlls you need - but just take the Qt ones not the system/generic ones). For plugins you need to do a bit more (but its fairly simple). I even wrote a bash script to do this automatically (i'll send it to you if you need it), in windows there is a qt script called windeployqt (not sure why there is not a linux variant).
If I where to start again looking into deployment I would go for dynamic linking. Maybe try with a simple project to start with (like a hello world proj).
I am getting into a position where I have to use other people code for projects, for example openTLD. I want to change some of the code to give it more functionality and use it in a diffrent way. What I have found is that many people have packaged their files in such a way that you are supposed to use
cmake
and then
make
and sometimes after that
make install
I don't want to install the software on my system. What I am looking to do is get these peoples code to a point where I can add to it in Eclipse or even just using Nano and then compile it.
At what point is the code in a workable/usable state. Can I use it after doing cmake or do I need to also call make? Is my thinking correct that it would be better to edit the code after calling cmake as opposed to before? I am not going to want my finished code to be cross platform supported, it will only be on Linux. Is it easer to learn cmake and edit the code befor running cmake as opposed to not learning cmake and using the code afterwards, if that is possible?
You question is a little open ended.
Looking at the opentld project, there is a binary and a library available for use. If you are interested in using the binary in your code, you need to download the executables(Linux executables are not posted). If you are planning to use the library, you have two options. Either you use the pre-built library or build it during your build process. You would include the header files in your custom application and link with the library.
If you add more details, probably others can pitch in with new answers or refine the older ones.
I am facing a strange problem, maybe somebody can point me to right direction.
I have an application that uses a shared library that I built back in the day, shared library is stored under /usr/lib/ folder. My application binary used to work OK with this set up. Yesterday I tried to install ORACLE-XE to my linux distro. Ran some scripts that set some environment variables. My installation failed and I had to uninstall ORACLE-XE.
When I came back to work today, I tried to run my binary just like I used to, but I've seen some errors about undefined symbol. Symbol name was related to the shared library that I used seamlessly for months. I have the same setup in other machines, I confirmed that application is still working there, so I copied application binary and shared library from other computers to the computer that I am working on, still no luck. It seemed to me that like shared library is not being loaded at all, I tried deleting the shared library and running the application one more time, I received the same error, right around the same time.
I think the oracle scripts might have mingled some of the environment variables, therefore shared library can not be loaded. I am not sure what to check next though, any suggestion would be appreciated.
ldd application-name helped me to identify where the shared library is being read from, it appears that there was another version of shared libary under /usr/local/lib, which was causing the issue.
I need to fix leaks in a huge open-source library. For that I am using google-perftools, Now this library is linked in another big application, which can also have possibaly lots of memory leaks [ Finding leaks from an application is not my goal/job] so how can I ask google HEAPCHECKER to only get the memory leaks of library and not of application?
One approach I have tried is:-
I linked library with google-perftools lib and did not explicitly linked an application with it. and while running an application with HEAPCHECK enabled, It gives me this error
Check failed:
heap_profile->FindAlloc(test_str,
&size): our own new/delete not linked?
Please help me in finding solution to get the memory-leaks of only library.
PS. My platform is embedded linux and I am using gnu linker and G++ compiler.
Well, I found that it is not possible with google-heap-tools.