[opensuse-packaging] libraries could not be found from package
Dear all, I'm having an issue with some libraries in a program I'm helping to package using obs. The program is called gnuaccounting and you'll find the obs project under Build Service > Projects > home:lumnis > gnuaccounting ( https://build.opensuse.org/package/show?package=gnuaccounting&project=home%3Alumnis ) It is mainly a java progam, but using some native libraries for viewing documents etc. All the java stuff and pics/icons/doc goes into /usr/share/gnuaccounting. All platform depended libraries (here: libnativeview.so ) go into /usr/lib or /usr/lib64 Because the dev team put the latter ones in the project directory also (now the /usr/share/gnuaccounting directory), this is the tested setup. For packaging and QA checks during rpm build, this is not acceptable and package build breaks with badness error in rpm lint check. Could anybody help pointing me/the developers in the right direction to find a solution to that. Isn't it so, that libraries, when located in /usr/lib should be picked up by programs automatically. What is required, to make that happen (e.g. system variables for path). regards, Denny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Sun, 1 May 2011 12:44:38 +0200, Denny Beyer
Isn't it so, that libraries, when located in /usr/lib should be picked up by programs automatically.
They should be located in the libdir that matches the architecture, i.e. 32 bit ones in /usr/lib and 64 bit ones in /usr/lib64 but only if the file matches the name being sought. The only thing necessary is that you run ldconfig after (de)installing the library in the packages %post and %postun sections. This would look like %post /sbin/ldconfig %postun /sbin/ldconfig Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi Philipp, thank you for sharing your thoughts. Am Sonntag, 1. Mai 2011, 12:59:40 schrieb Philipp Thomas:
On Sun, 1 May 2011 12:44:38 +0200, Denny Beyer
wrote: Isn't it so, that libraries, when located in /usr/lib should be picked up by programs automatically.
They should be located in the libdir that matches the architecture, i.e. 32 bit ones in /usr/lib and 64 bit ones in /usr/lib64 but only if the file matches the name being sought. The only thing necessary is that you run ldconfig after (de)installing the library in the packages %post and %postun sections. This would look like
%post /sbin/ldconfig
%postun /sbin/ldconfig
I applied the changes, but it still doesn't work. Probably due to some "hardcoded" paths in the sources. the libs are expected in the program directory, libs "libs" . I informed the developers, but didn't get any positive reply about planned changes.
Philipp
Denny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi8 Denny, * Denny Beyer (opensuse@dennybeyer.de) [20110505 10:12]:
I applied the changes, but it still doesn't work. Probably due to some "hardcoded" paths in the sources.
Of cause the code has to know where the plugin/library is installed. But it also depends on the way the library is loaded and that again needs someone that understands java which I'm not. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Philipp Thomas (pth@suse.de) [20110505 10:44]:
But it also depends on the way the library is loaded and that again needs someone that understands java which I'm not.
So the question to ask upstreams is how this library is loaded. BTW, if they are not responsive, just abandon your efforts and tell so upstream. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Philipp Thomas
* Denny Beyer (opensuse@dennybeyer.de) [20110505 10:12]:
I applied the changes, but it still doesn't work. Probably due to some "hardcoded" paths in the sources.
Of cause the code has to know where the plugin/library is installed. But it also depends on the way the library is loaded and that again needs someone that understands java which I'm not.
You can set -Djava.library.path in the java command line in the start script if the lib is not found. Regards, Bernhard -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Thu, 5 May 2011 13:01, Bernhard Walle
* Philipp Thomas
[2011-05-05 10:44]: * Denny Beyer (opensuse@dennybeyer.de) [20110505 10:12]:
I applied the changes, but it still doesn't work. Probably due to some "hardcoded" paths in the sources.
Of cause the code has to know where the plugin/library is installed. But it also depends on the way the library is loaded and that again needs someone that understands java which I'm not.
You can set -Djava.library.path in the java command line in the start script if the lib is not found.
This works for java-libs (.jar) but on other not so well. If all other ways fail there is the possibility of setting a LD_LIBRARY_PATH=/path/to/your/libs in the start script and mark it for export. If you go full expert then there's also ldconfig and its options, see man 8 ldconfig, esp. "ldconfig -l library-name" Regards, Yamaban. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Yamaban (foerster@lisas.de) [20110505 13:24]:
If you go full expert then there's also ldconfig and its options, see man 8 ldconfig, esp. "ldconfig -l library-name"
That all doesn't help if the java software is hardcoded to a path that isn't allowed by FHS and thus not allowed in openSUSE, i.e. like /usr/share/lib for binary libs/plugins. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Thu, 5 May 2011 16:31, Philipp Thomas
* Yamaban (foerster@lisas.de) [20110505 13:24]:
If you go full expert then there's also ldconfig and its options, see man 8 ldconfig, esp. "ldconfig -l library-name"
That all doesn't help if the java software is hardcoded to a path that isn't allowed by FHS and thus not allowed in openSUSE, i.e. like /usr/share/lib for binary libs/plugins.
What's the 'offical' take on /usr/share/java* wrt binary libs/plugins ? Yes, I know, java is the ugly stepmother everone works around, but the FHS isn't really conclusive on this. Either the 'steering committee' gives a steering on this, or someone else should give a hint in the packaging / obs-docu on how to handle this cases. This is not the first case and, as we are human, will not be the last. A little direction, even if it's just the explanation you've given is more than what is available on this point now. In the tenor you've given, I'd say the use of LD_LIBRARY_PATH in the start-script would be the best solution in this case. Please be as kind and give a clearing comment, as I'm also interested in a valid (working and acceptable) solution. With regards, Yamaban. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Thu, 5 May 2011 16:47:06 +0200 (CEST), Yamaban
What's the 'offical' take on /usr/share/java* wrt binary libs/plugins ?
IMO if its java bytecode it's OK but not for binaries compiled for a certain platform. Those belong in a directory below /lib or /lib64.
In the tenor you've given, I'd say the use of LD_LIBRARY_PATH in the start-script would be the best solution in this case.
It won't help! If the application has the path to the library hard coded no trick besides a symlink will help you to load it from somewhere else. LD_LIBRARY_PATH will only help when the application requests the library by name. Example: gcc -shared -o libfoo.so -fPIC foo.o -L$(JAVA_HOME)/lib/jre/amd64 \ -ljawt In that case libfoo.so will have libjawt.so recorded in its DT_NEEDED field (as you can see by doing 'objdump -p' on the binary). The above plugin will only work if either the non-standard path to the AWT lib is put into /etc/ld.so.conf or if you set LD_LIBRARY_PATH. BTW, LD_LIBRARY_PATH is ignored for binaries with effective uid root as that would otherwise open a huge security hole. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Donnerstag, 5. Mai 2011, 22:48:00 schrieb Philipp Thomas:
On Thu, 5 May 2011 16:47:06 +0200 (CEST), Yamaban
wrote:
What's the 'offical' take on /usr/share/java* wrt binary libs/plugins ?
IMO if its java bytecode it's OK but not for binaries compiled for a certain platform. Those belong in a directory below /lib or /lib64.
[....] oh dear, you are facing more chaos when you go to the original project and download the linux src package (!) there you'll get all sorts of libraries, jar's, so's AND dll's . dll's in the LINUX PACKAGE ? it all wouldn't be that big of a problem, but ant can't compile because it doesn't find ant.jar in the projects folder due to some path problems, ant it's not using the system installed version. This sounds like a never ending fun thing. Denny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
[...] sorry, talking about the NOA project (http://ubion.ion.ag/solutions/004niceofficeaccess) used in gnuaccounting which caused this issue here.
oh dear, you are facing more chaos when you go to the original project and download the linux src package (!) there you'll get all sorts of libraries, jar's, so's AND dll's . dll's in the LINUX PACKAGE ?
it all wouldn't be that big of a problem, but ant can't compile because it doesn't find ant.jar in the projects folder due to some path problems, ant it's not using the system installed version.
This sounds like a never ending fun thing.
Denny
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Denny Beyer (opensuse@dennybeyer.de) [20110506 19:00]:
it all wouldn't be that big of a problem, but ant can't compile because it doesn't find ant.jar in the projects folder due to some path problems, ant it's not using the system installed version.
I have no problem running ant in my factory system. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag, 9. Mai 2011, 15:04:57 schrieb Philipp Thomas:
* Denny Beyer (opensuse@dennybeyer.de) [20110506 19:00]:
it all wouldn't be that big of a problem, but ant can't compile because it doesn't find ant.jar in the projects folder due to some path problems, ant it's not using the system installed version.
I have no problem running ant in my factory system. When extracting the src from http://ubion.ion.ag/solutions/004niceofficeaccess/releases/2.2.3 and run />ant on the commandline i get />java.io.FileNotFoundException: /home/user/mypackages/home:/usr/share/java/ant.jar
Philipp
Haven't seen anything obvious, but obviously it has a problem with the local obs directories. When running it elsewhere e.g. /home/user/tmp , it works. cheers, Denny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Denny Beyer (opensuse@dennybeyer.de) [20110510 09:03]:
When extracting the src from http://ubion.ion.ag/solutions/004niceofficeaccess/releases/2.2.3 and run />ant on the commandline i get />java.io.FileNotFoundException: /home/user/mypackages/home:/usr/share/java/ant.jar
Not so for me. When I run ant I get no Error and it just tells me the possible options as it should. This is indeed strange. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (5)
-
Bernhard Walle
-
Denny Beyer
-
Philipp Thomas
-
Philipp Thomas
-
Yamaban