Programming :: Compile Shared Object Files Using Valac ?
Oct 20, 2010What flags do you have to pass to valac to compile code into a shared library (file extension .so)?
View 1 RepliesWhat flags do you have to pass to valac to compile code into a shared library (file extension .so)?
View 1 RepliesI have created an application that has a executable program that loads in a shared object
the shared object loads in another shared object
both of these shared object I have created
For debugging I have been printf'in data to determine what is going on
I now have some odd memory issue, and need a bit more control over debugging...
I have one workspace set up and under my exectuable(will call maintest from now on) I have two items in my link libraries under project build options being soA and soB (so A is the shared object that maintest uses, soB is the SO that soA uses) I also have linker options pthread and ldl
At the beginning of my maintest I do my dlsym and load in each function that I will be using
I always run my program using maintest, because when I have one of the SO as the startup project(turns bold) and try to run it gives me "You must select a host application to run a library"
I tried to set up this host library, i Go to Menu->Project->SetProgramArguments and change the Host Application to the debug version of my maintest
I then hit OK and try to run again but I get the same error: "You must select a host application to run a library"
If I get this part working - which I need help doing, is tehre other steps that need to be taken to debug the so's? or will this make it so when i hit f8 it will run.
I've got an error with compiling a program: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/python2.5/config/libpython2.5.a: could not read symbols: Bad value collect2: ld a retourn 1 code dtat d'excution make[2]: *** [bindings/_yafqt.so] Erreur 1.
View 1 Replies View RelatedI wanted to know how can I change the default place of shared object files of a program in a system. let me explain it better for you : I have an embedded computer with Linux OS that its file system is read only and I can not add any file to /usr /lib and ..... and I can just mount a SD memory card to it and copy all of my programs to it and run them from there as you understand I have two choices to choose, first make one big binary file for each program that I am doing it now and it is not a suitable solution and the second is finding the way to change default place of shared object file of my program.
View 1 Replies View RelatedOur application uses a dynamically loaded shared object library (codec library) to compress and decompress audio streams.
There happens to be several static and global variables in this shared object library. Hence it is not possible to process two interleaved unrelated media streams using this shared object codec library because each stream corrupts/changes the contents of these static/global variables.
Is there a way through which a context save (save contents of data segment of shared object) and a context load (load previously saved contents of data segment of shared object)operation can be performed on the shared object library. This way the context for each media stream can be saved and loaded before and after processing the "other" media stream respectively.
I have an application consisting of different processes and all these processes are linked to shared libraries. I start the application (spawn all the different processes) as say user1. Now with the application up, if I run a process p1, the process gets activated and works. However, if I start the same process p1 as a different user, say user2, which is completely different from user1 the process complains of
"error while loading shared libraries:...."
I set LD_RUN_PATH both in compile and runtime environment. LD_LIBRARY_PATH is set correctly in both places.
All the above works if I set the absolute path of the required shared libraries in /etc/ld.so.conf file and rebuild the /etc/ld.so.cache
Alright, just loaded a fresh copy of OpenSuSE 11.3 x64, went to update manager and let it update, came back and computer was shut down. After booting it back up, I cannot update any software, nor run any commands.
Here is my output:
Code: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory I've tried searching for this error, some people came back saying to run this:
Code:
But all that happens is this:
Code:
Nor ls work either so I'm stuck and thinking about a reinstall.
I don't understand how this system could be so messed up after a failed update.. Used to trust SuSE, not sure anymore after this incident..
Installed Skype but it wont launch. Running the latest Opensuse Gnome. Ive uninstalled it and reinstalled several times but always with the same error. When I try to run it from terminal I get this:
ig@linux-ljqk:~> skype
skype: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
Ive just now uninstalled skype and tried reinstalling it again via yast, but now I get the following error [PK_TMP_DIR|dir:///var/tmp/TmpDir.xftzR0] Repository already exists.
just installed Ubuntu 10.04 and installed the flightgear package and the fgfs-base package. I ran fgfs from a terminal and got this error:
Code:
$ fgfs
fgfs: error while loading shared libraries: libOpenThreads.so.12: cannot open shared object file: No such file or directory
$
So then I did:
Code:
sudo apt-get install libopenthreads12
and it gave me these errors:
[Code]...
I'm trying to run Kega Fusion on my laptop, which can now FINALLY run Linux (ATI drivers finally work on it), and I can't get the emulator to work..
Code:
brandon@brandon-laptop:~/Desktop/Fusion$ ./Fusion
./Fusion: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory
brandon@brandon-laptop:~/Desktop/Fusion$ uname -a
Linux brandon-laptop 2.6.32-24-generic #38-Ubuntu SMP Mon Jul 5 09:20:59 UTC 2010 x86_64 GNU/Linux
brandon@brandon-laptop:~/Desktop/Fusion$
Help? I have the ATI proprietary drivers installed. I tried without them and it still wouldn't work. (And OpenGL is seemingly working as Compiz Fusion is running. I also tried with Compiz disabled but the same error pops up).
I'm running lucid 32-bit. I get this error when I try to run the installer for Unreal Tournament GOTY:
Code:
Verifying archive integrity... All good. Uncompressing Unreal Tournament 436-multilanguage.goty Installer. /home/computer/.setup1548: error while loading shared libraries: libgtk-1.2.so.0: cannot open shared object file: No such file or directory computer@computer-desktop:~/UnrealInstall$ I tried installing libgtk1.2 (as told by some people in other threads), but couldn't do that:
Code:
E: Couldn't find package libgtk1.2
However, I checked that I do have libgtk2.0
So what should I do?
After finally getting my wireless/graphics drivers working yesterday (thanks to this forum ) I startx to realize that not a single KDE/Qt application will launch, along with Firefox, or Chrome/Chromium. (I did a full install from the DVD, not deselecting anything, and when I upgraded to -current, I also did the same.)
Ark said:
Quote:
ark: error while loading shared libraries: liblzma.so.0: cannot open shared object file: No such file or directory
but I managed to fix that one by commenting out 'aaa_elflibs' in /etc/slackpkg/blacklist (on a recommendation from #slackware), and running slackpkg upgrade-all again, but that's the only one (afaik) that was fixed. Ark still doesn't work, but it doesn't show that error anymore. When I run it, a box pops up that says "Unable to find Ark's KPart component, please check your installation."
Kate still says:
Quote:
kate: error while loading shared libraries: libkemoticons.so.4: cannot open shared object file: No such file or directory
Now, konsole, firefox, and Chromium's errors are a little different.
Konsole:
Quote:
konsole: symbol lookup error: /usr/lib/libphonon.so.4: undefined symbol: _ZN9QMetaType15registerTypedefEPKci
Firefox and Chrome basically say the same thing
Quote:
/usr/lib/firefox-3.6.13/firefox-bin: symbol lookup error: /usr/lib/mozilla/plugins/skypebuttons.so: undefined symbol: _ZN9QListData11detach_growEPii
again, I am completely baffled here, as I had kate, konsole and ark running before I upgraded to -current.
I want to run blender in Ubuntu910,but get below
test@ubuntu:~$ blender
blender: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
I am running after compiling a program and I find that I get the following. How best can I avoid this as i cannot run the program. I have tried removing the offending package, although I cannot find it. I have also tried re-installing. I have also tried changing FC and F90 flags to avoid the MPI version.
error while loading shared libraries: libmpi_f90.so.0: cannot open shared object file: No such file or directory
I am creating two shared libs that i intend to be dynamically linkable in C and C++, cross platform Linux/Windows/Mac. As a basic sketch, true for both libs, the lib code is in several .c/.cpp and .h files. For now, I'll talk about the part that I am actively working on, a lib named Discover, i.e. libdiscover.so.1.0. First, everything is in a namespace, RemKon_Discover.
The main Discover.cpp defines the methods for the Discover class (declared in Discover.h) and has extern "C' routines that can return pointers to my main c++ object. The call to GetLibraryMainPointer() creates a Discover class object, theMainObject (ok, I win a prize for dumb names) and returns the (non-mangled) pointer to the caller over in my test program. The Discover class itself is declared extern "c" and the tester program #includes "Discover.h".
In the test program, dlopen() correctly opens the lib and dlsym() gets the pointer to theMainObject. However, when I use that pointer in the tester program to access a method (aDiscoverObject->hello(), e.g.) I get compile time errors saying that Discover::hello() in an undefined reference. My makefile is attached.
[Code]....
Now that I've entered the realms of permanent beta software I'm completely lost.
I compile a program like this: icc main.c -L. -lxyz -L/usr/X11R6/lib -lX11 -lpthread -lm -std=c99
(But I have no concrete idea about what -L and -l mean. l is short for lib? Why? -L seems to specify the path for some library that follow directly afterwards?). Anyway, it works.
So I get an output file a.out (why a?), which I run by writing ./a.out .
Then I get this error message: error while loading shared libraries: lxyz.so: cannot open shared object file: No such file or directory
I have it in my directory but it won't find it? What's wrong?
Here is my problem: I have a Vala program that includes classes with nested classes. When I try to initialize classes (using the variable type and the variable, followed by the class's arguments [three unsigned 8-bit integers] in parentheses) and try to compile the Vala code to C code what I tried to AVOID doing, as I really wanted to create a shared object file, but now I know I have to use C code as a middleman, the compiler tells me it expects a semicolon between the class variable name and its members.
What?! A semicolon in a bad place, that's for sure! Why would I want to put a semicolon *BETWEEN* the class initialization and its members? Isn't the whole point of a class to *HAVE* different members? Here is my class:
Code:
public class Gtk.rgba : GLib.Object {
public class fg_color : GLib.Object {
private uint8 red;
private uint8 green;
private uint8 blue;
//Constructor
public fg_color(uint8 r, uint8 g, uint8 b) {
[Code].....
When is it good to use separate translation units and object files and link them into the main C program, and when is it good to include the header files in the main C program? I don't understand if most people include header files or if most people just link in object files and use their contents in the main program. It's sort of a simple question, but it's confusing to me and that's why I need help with it. I sort of don't understand the difference, or if there's really no difference other than the way the final result is achieved, which way is better or preferred, etc...
For example:
Code:
or:
Code:
Simple explanation of the difference? or which one is preferred or better? I've read a little on the ELF format... so is there no difference in the end result? It's just a matter of preference or necessity, and where the information is to begin with?
I upgrade the system from 11.1 to 11.2 seems everything work fine, no error no warning, after a reboot the consol show : mount error while loading shared libraries: libvolume_id.so.1: Cannot open shared object file: No such file or directory. when I try to repair the system the repair tool cannot find the root partion,
View 1 Replies View Relatedhow to install libxcb-xlib.so.0?When I start one software and it complains that
"error while loading shared libraries: libxcb-xlib.so.0: cannot open shared object file: No such file or directory"
I have lastest libxcb1 installed and searched in my system but didnot find a relevant result.
I installed the latest Gimp beta and it worked fine but then I couldn't open it. I removed it and I reinstalled but it didn't work, so I installed the latest stable version (no beta) and it still does not work, when I open it form Terminal, this is the response:gimp: error while loading shared libraries: libbabl-0.0.so.0: cannot open shared object file: No such file or directory
View 3 Replies View RelatedI am using Centos 5.2, and I installed all of the available gnome and gnome development libraries available via the "add software" menu item. Still, when running some programs, I get the following error message:
"error while loading shared libraries: libzvt.so.2: cannot open shared object file: No such file or directory"
If I understood it correctly, libzvt.so.2 is part of some gnome libs... where to find and how to install them?
Only ones I can think of seem overly complex, and I'm sure there is a simple solution I am overlooking. I have a class, it has a member who is an object. This object needs to be able to represent an object of different types.
[code]...
Where "surface" could be several different types, which will be set during execution. Hope this is clear enough. I have tried using templates but am getting "data member cannot be a member template". Either I have incorrect syntax, or am not implementing it right. another solution would have one class containing definitions of all possible shapes, But this would take up extra memory. Other solutions I thought of seem too round-about, and seems there is a simpler solution that I have overlooked.
I have created a simple test class - Mortgage, with the class declaration in the .h file and the class's methods defined in the .cpp file. (mortgage.h && mortgage.cpp, respectively) Straight up C++ 101 as far as I can tell. I instantiate the class in the main() function, which is defined in practice.cpp. Using Geany on Ubuntu, both the practice.o and mortgage.o files are created, but then I get a linker error: undefined reference to class::functionName
I get it for each function. If the mortgage.cpp file is foremost in the editor when I click "build", then I get the undefined reference to main() error, if practice.cpp is foremost (where the main() function is) then I get undefined reference to Mortgage::Mortgage(), and all the rest of the functions defined for that class. How do I get the linker to know where my object files are so it will link them in? Or is the problem somewhere else entirely?
I've got a redhat 5.5 machine which is supposedly up-to-date according to RHN. When I try to do anything with yum, I get the following error:
Code:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
[code]...
I'm trying to install a game (uplink) which states 'error while loading shared libraries: libgtk-1.2.so.0: cannot open shared object file: No such file or directory'
Would installing the below resolve this? If so is 'Everything' safe to use (not heard of it before) and how do i add the 'everything' repository? I
download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/i386/os/Packages/gtk+-1.2.10-71.fc15.i686.rpm
I get the following error after installing a package. I believe this occurred because zypper attempted to update libxml2 to meet package dependencies.
Code:
Is there any way to manually update the package database to solve this problem?
I've been trying to compile metakit for a couple of days now, and I got along okay, until I reached the, "make test line". That's when I got this error;Code:./regress: error while loading shared libraries: libmk4.so: cannot open sharedobject file: No such files or directorymake: *** [test] Error 127Does anyone know how I'm supposed to fix this?
View 1 Replies View RelatedPeazip is a software at 32 bit.I have installed ia32libs but:$ ./peazip./peazip: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory.I have already installed libgtk2.0-0.
View 5 Replies View RelatedI need assistance in linux shared object installation. I have created a .so library for my code,copied it to /usr/lib/ directory & created the symbolic link for it but when I try to compile my code with option -l it gives errors like header files are missing...class has not been declared. actually these all are includede in .so file. I am compiling my code for cross platform PowerPC & using simulater to run that. I have also included this .so in to the file system of powerpc simulater but still same problem...
real name : libamqpproxy.so.1.0.0
link: libamqpproxy.so.1->libamqpproxy.so.1.0.0