I am a modest researcher who wants to compile his code in a server and let the executable file run in the cluster nodes.
In order to avoid problems, I used to compile statically in the server and send the static executable to the nodes. Since
opensuse 12.2, this has become an odyseey. The static libraries disappear from the “devel” packages. There are some
“devel-static” packages out there, but the list is by far not complete leading to a cascade of errors during compilation time.
One solution would be to compile yourself “the” missing static library, but after statically linking this library, the next one is
missing and the process seems to last arbitrarily long.
I’ve heard that the omission of static libraries is the new policy of opensuse for the current and coming releases. There might
be thoughtful reasons behind this decision, but … Are you aware of the huge amounts of troubles that this decision is causing?
Do you consider adding the “devel-static” packages to the opensuse repositories in the near future?
Under the current conditions, I only see two painful solutions: either to download the source tarballs and compile the static
libraries myself or to migrate wherever the compiling experience is more pleasant for non-IT expertises.
Thanks for any reply, answer, comment, advice or piece of information regarding this issue!
S.
I see 2 more or less easy possibilities for you, without the need to
switch to another distribution.
use a chroot environment into which you install e.g. CentOS or
another distro which fits your need for the static compiles
just setup a virtual machine (e. g. with VirtualBox) in which you
install the other distro for the static compile.
I think you will run into trouble by swimming upstream if you try to
shoehorn openSUSE which goes a different way (away from providing the
devel-static) to be usable for pure static compiles.
Still it is maybe worth if you bring up that topic on a openSUSE
developer mailing list (factory mailing list maybe?) to see what they
say and what the plans really are for the future.
–
PC: oS 12.3 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.10.0 | GTX 650 Ti
ThinkPad E320: oS 12.3 x86_64 | i3@2.30GHz | 8GB | KDE 4.10.0 | HD 3000
HannsBook: oS 12.3 x86_64 | SU4100@1.3GHz | 2GB | KDE 4.10.0 | GMA4500
Martin Helm wrote:
> I see 2 more or less easy possibilities for you, without the need to
> switch to another distribution.
>
> 1. use a chroot environment into which you install e.g. CentOS or
> another distro which fits your need for the static compiles
> 2. just setup a virtual machine (e. g. with VirtualBox) in which you
> install the other distro for the static compile.
>
> I think you will run into trouble by swimming upstream if you try to
> shoehorn openSUSE which goes a different way (away from providing the
> devel-static) to be usable for pure static compiles.
There may be another alternative, which is better management of your
cluster.
All your cluster machines should have an identical environment, so a
suitably-compiled dynamically-linked executable should run identically
on them all. If the machines are identical, it makes them a lot easier
to manage anyway.
Similarly, your cluster should be provided with a machine on which it is
possible to compile programs to run in that environment. That is simply
a matter of good system management.
So in a well-run environment, you should not experience difficulties
running dynamically-linked programs on your cluster.
> Still it is maybe worth if you bring up that topic on a openSUSE
> developer mailing list (factory mailing list maybe?) to see what they
> say and what the plans really are for the future.
I would echo what Martin says. Not many developers read or participate
in these forums. You would be better making and defending your arguments
in the place where they are.
On 2013-04-18 10:36, ribazo wrote:
>
> Hi,
>
> I am a modest researcher who wants to compile his code in a server and
> let the executable file run in the cluster nodes.
> In order to avoid problems, I used to compile statically in the server
> and send the static executable to the nodes.
I think as Dave, you should have identical nodes and use dynamic linking
instead. Less work and fighting
> I’ve heard that the omission of static libraries is the new policy of
> opensuse for the current and coming releases.
True, AFAIK.
> There might
> be thoughtful reasons behind this decision, but … Are you aware of
> the huge amounts of troubles that this decision is causing?
Who is “you”?
Here in these forums we are mostly users helping users. There are few
developers, and even fewer of those making the decisions. You should ask
about this in the factory mail list instead.
Thanks for the tips! These solutions may help, but both of them are workarounds to
opensuse is not providing (many) static libraries and I am looking for something more
straightforward.
I agree. Having an identical environment in all cluster machines and compiling dynamically
will avoid this problem. However, I still don’t see the point of not providing the static libraries
and let the user to decide whether he/she feels that day static or dynamic. Is it so exotic to
want to compile from time to time statically?
Gracias Carlos for taking it with sense of humor! I really appreciate all
your replies!
“You” is someone in my dreams that whispers “don’t worry! SuSe will support
again static compilation the day after tomorrow”.
Anyway, thanks again for the replies, even if I didn’t post the topic in the
appropriated forum. I will consider going to the factory guys …
Hi
You can always check on OBS for the packages, someone (maybe the Science repository) has created static versions. You can always link to the package and rebuild with the static files enabled in you own OBS home project?
Hi Malcolm, I have already enabled the Science and Education repositories and none of them contains the static libraries that I need, … neither they are in software.opensuse.org: Search. I also checked unsuccessfully in packman and in the web …
I didn’t know about the OBS. It looks interesting to me, but still not the easiest solution.
Cheers,S.
malcolmlewis;2548767 Wrote:
> Hi
> You can always check on OBS for the packages, someone (maybe the
> Science repository) has created static versions. You can always link
> to the package and rebuild with the static files enabled in you own
> OBS home project?
>
> ‘software.opensuse.org: Search’ (http://software.opensuse.org/search?)
>
> https://build.opensuse.org/
Hi Malcolm, I have already enabled the Science and Education
repositories and none of them contains the static libraries that I need,
… neither they are in ‘software.opensuse.org: Search’
(http://software.opensuse.org/search?). I also checked unsuccessfully in
packman and in the web …
I didn’t know about the OBS. It looks interesting to me, but still not
the easiest solution.
Cheers,S.
Hi
Can you provide some specific examples of the static libs you require?
–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.3 (x86_64) Kernel 3.7.10-1.1-desktop
up 15:37, 3 users, load average: 0.15, 0.09, 0.09
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Arrandale
There is of course yet another solution when static compile is not
possible (becuase of the missing static libs). Compile dynamic and ship
the .so files together with your application and a startup script which
takes care that they are used.
I do not know your cluster so I do not know if it is easy or not for you.
–
PC: oS 12.3 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.10.0 | GTX 650 Ti
ThinkPad E320: oS 12.3 x86_64 | i3@2.30GHz | 8GB | KDE 4.10.0 | HD 3000
HannsBook: oS 12.3 x86_64 | SU4100@1.3GHz | 2GB | KDE 4.10.0 | GMA4500
libnetcdf.a libhdf5_hl.a libhdf5.a libgomp.a libpthread.a libz.a librt.a (all of them found in opensuse repositories)
but the compilation fails because libcurl is required and I didn’t find it in any repository.
I downloaded the source code, compiled and linked. Then, some undefined references were found in the curl library (I think from libssl, libssh2, … ).
At that point I gave up.
I have tried in both opensuse 12.2 and 12.3 enviroments. (Before, <= 12.1, I had no problem)
cheers,
S.
> I agree. Having an identical environment in all cluster machines and compiling dynamically
> will avoid this problem. However, I still don’t see the point of not providing the static libraries
> and let the user to decide whether he/she feels that day static or dynamic. Is it so exotic to
> want to compile from time to time statically?
I don’t see the point either.
I could find threads where the devs defended their position of not
providing static libraries, perhaps. The point has been asked before.
Recently, it turned out that a shell that is supposed to run statically
(shash - StandAloneShell) linked for use in emergencies, no longer does
so and needs somethings linked dynamically, which may fail if using a
separate /usr partition which failed to mount. Or something of the sort.
The person that brought up the issue in the factory mail list doesn’t
have… how can I word it… doesn’t have the abilities to facilitate
peaceful collaboration, or something like that… her threads often
develop into flame wars.
One good answer she got:
+++·····························
>> Why do getgrgid geeetgrnam getpwnam and getpwuid not build static?
>>
>
> This is by design, it is intended that way.
see Static
Linking Considered Harmful bullet points 4 and 5 but I suggest you
to read the whole article.
·····························+±
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)
Carlos E. R. wrote:
>>> Why do getgrgid geeetgrnam getpwnam and getpwuid not build static?
>>>
>> This is by design, it is intended that way.
>
> see Static
> Linking Considered Harmful bullet points 4 and 5 but I suggest you
> to read the whole article.
> ·····························+±
Hmm, as already indicated, I believe that dynamic linking is generally
better and is suitable for the OP’s purpose. However, I don’t think
Ulrich’s exposition makes a solid case. It certainly covers the case of
programs like those mentioned above, because they have significant
security requirements apart from anything else. But the OP’s programs,
so far as we know, have no security requirements, don’t need to be
distributed in binary to other organizations, and don’t use any of the
problematic libraries that Ulrich mentions. So none of his arguments
apply to the OP’s programs.
Carlos E. R. wrote:
> On 2013-04-19 02:43, Carlos E. R. wrote:
>
>> You can read that thread, and others, in the factory mail list, and read
>> their reasoning.
>
> For instance, this thread is interesting:
>
> > opensuse-project - netcdf static libraries opensuse](http://lists.opensuse.org/opensuse-project/2013-04/msg00059.html)
I’m not sure why you think that is interesting, in the current context?
There’s nothing there about policy, for example.
> I’m not sure why you think that is interesting, in the current context?
> There’s nothing there about policy, for example.
Policy, not. Questions about availability of static libraries, some
named in this thread, yes. A bug report was suggested, so it is possible
that they consider providing some of those libraries.
I’m just indicating some links that come under my radar about static
libraries.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)
Am 19.04.2013 15:03, schrieb Carlos E. R.:
> On 2013-04-19 14:42, Dave Howorth wrote:
>
>> I’m not sure why you think that is interesting, in the current context?
>> There’s nothing there about policy, for example.
>
> Policy, not. Questions about availability of static libraries, some
> named in this thread, yes. A bug report was suggested, so it is possible
> that they consider providing some of those libraries.
>
> I’m just indicating some links that come under my radar about static
> libraries.
>
Sounds a bit like the policy “we remove static libs by default unless
someone explicitly asks for them”.
–
PC: oS 12.3 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.10.0 | GTX 650 Ti
ThinkPad E320: oS 12.3 x86_64 | i3@2.30GHz | 8GB | KDE 4.10.0 | HD 3000
HannsBook: oS 12.3 x86_64 | SU4100@1.3GHz | 2GB | KDE 4.10.0 | GMA4500
I am currently trying to compile a binary on 12.1 for 11.4, but there are some .so libraries missing on the older build. What is a startup script supposed to carry out using this approach? Where should I put the .so files and where in makefile do I have to mark their location?