Bug 438567

Summary: lesstif-devel and static
Product: [Fedora] Fedora Reporter: Steve Morgan <captainmrgn>
Component: lesstifAssignee: Patrice Dumas <pertusus>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 10CC: hdegoede, triage
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-16 14:19:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Morgan 2008-03-22 01:10:54 UTC
Description of problem: lesstif-devel is missing the static version of
/usr/lib64/libXm.a

How reproducible: Try and compile anything that requires a static version of libXm.a

Additional info: RHEL includes this file.

Should this file be included or should I be looking elsewhere?

Comment 1 Patrice Dumas 2008-03-22 11:08:13 UTC
If shipped, the static library should be in lesstif-static.

Do you want to link statically only libXm, or link statically
your application? If you want to link statically your application, 
you'll also need to have static X libraries.

Comment 2 Steve Morgan 2008-03-23 22:58:39 UTC
That package is not in the repositories. I'm trying to build the NCBI toolkit
and it is looking for the static version of libXm.a and it's not there.

Comment 3 Patrice Dumas 2008-03-24 00:12:30 UTC
I know that they are not there, but I am reluctant to add them if the
static libraries static lesstif depends on aren't in fedora.

I also tried to compile and use the ncbi toolkit. I didn't need 
the static library, though I needed to do a lot of adjustments to
comply with fedora packaging policies, avoid overlinking, and ship
shared libraries (crippled shared libraries without soname, but it
is better than nothing).

In the end the program I wanted to use with ncbi, content, segfaulted
at random places, though...

Anyway where do you see a need to use static lesstif? I don't see it for
linux.

I will send you personally my spec file, patch and additional sources I
needed for my ncbi packaging. Here is the srpm:
http://www.environnement.ens.fr/perso/dumas/fc-srpms/ncbi-0-0.1.20080302.fc9.src.rpm

Comment 4 Steve Morgan 2008-03-24 03:05:36 UTC
The ncbi source is very sloppy and did not include the path /usr/lib64 so I
added a few lines to clobber all the make files. This is very aggressive because
 it was very difficult to track down where ncbi was clobbering the path's. Any
way here is my fix.

perl -i -p -e 's/\$NCBI_OPTFLAG /\$NCBI_OPTFLAG -L\/lib64 -L\/usr\/lib64 /g'
./ncbi/make/* ./ncbi/platform/* ./ncbi/build/* 
perl -i -p -e 's/\$NCBI_CFLAG /\$NCBI_CFLAG -L\/lib64 -L\/usr\/lib64 /g'
./ncbi/make/* ./ncbi/platform/* ./ncbi/build/* 
perl -i -p -e 's/\$NCBI_CFLAG1 /\$NCBI_CFLAG1 -L\/lib64 -L\/usr\/lib64 /g'
./ncbi/make/* ./ncbi/platform/* ./ncbi/build/* 
perl -i -p -e 's/-lXm/-L\/lib64 -L\/usr\/lib64 -lXm/g' ./ncbi/make/*
./ncbi/platform/* ./ncbi/build/* 
perl -i -p -e 's/-lXm/-L\/lib64 -L\/usr\/lib64 -lXm/g' ./ncbi/make/*
./ncbi/platform/* ./ncbi/build/* 
perl -i -p -e 's/-L\/usr\/X11R6\/lib /-L\/lib64 -L\/usr\/lib64
-L\/usr\/X11R6\/lib64 /g' ./ncbi/make/* ./ncbi/platform/* ./ncbi/build/* 
perl -i -p -e 's/-L\/usr\/X11R6\/lib /-L\/lib64 -L\/usr\/lib64
-L\/usr\/X11R6\/lib64 /g' ./ncbi/make/* ./ncbi/platform/* ./ncbi/build/* 
perl -i -p -e 'L\/usr\/X11R6\/lib /L\/usr\/X11R6\/lib64 -L\/lib64 -L\/usr\/lib64
/g' ./ncbi/make/* ./ncbi/platform/* ./ncbi/build/*


This is where I have problems building.

gcc -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -o Psequin -I. -O3
-I../include  -L../lib -I/usr/X11R6/include -L/lib64 -L/usr/lib64
-L/usr/X11R6/lib64 -DWIN_MOTIF -UINTERNAL_NCBI_SEQUIN sequin1.c sequin2.c
sequin3.c sequin4.c sequin5.c sequin6.c sequin7.c sequin8.c sequin9.c sequin10.c
sequinx.c \
        -lncbicn3d -lddvlib -lvibnet -lncbidesk -lblastapi -lblast -lncbimmdb \
        -lncbitxc2 -lncbiid1 -lnetblast -lncbitool -lblastcompadj -lncbimla \
        -lncbiNacc -lnetentr -lnetcli -lncbicdr -lvibrant -lncbiobj -lncbi
-L/lib64 -L/usr/lib64 -L/usr/X11R6/lib64 -L/lib64 -L/usr/lib64 -L/lib64
-L/usr/lib64 -lXmu -Wl,-Bstatic -L/lib64 -L/usr/lib64 -L/lib64 -L/usr/lib64 -lXm
-Wl,-Bdynamic -lXt -lSM -lICE -lXext -lXp -lX11 -ldl -lm
sequin3.c: In function \u2018AddBlastTag\u2019:
sequin3.c:16737: warning: cast from pointer to integer of different size
sequin3.c: In function \u2018CommonAddBlastToSeqAnnot\u2019:
sequin3.c:16762: warning: cast to pointer from integer of different size
sequin6.c:262: warning: useless storage class specifier in empty declaration
sequin9.c: In function \u2018UpdatePairToUpdateTitlesDialog\u2019:
sequin9.c:14358: warning: large integer implicitly truncated to unsigned type
sequin9.c:14379: warning: large integer implicitly truncated to unsigned type
sequin9.c:14399: warning: large integer implicitly truncated to unsigned type
sequin9.c:14414: warning: large integer implicitly truncated to unsigned type
/usr/bin/ld: cannot find -lXm
collect2: ld returned 1 exit status
make: *** [Psequin] Error 1
FAILURE primary make status = 0, demo = 0, threaded_demo = 0, net = 2



Comment 5 Patrice Dumas 2008-03-24 10:31:59 UTC
(In reply to comment #4)
> The ncbi source is very sloppy and did not include the path /usr/lib64 so I
> added a few lines to clobber all the make files. 

You should not need to have -L/usr/lib64 nor -L/lib64, they are added 
automatically by the compiler when linking. You indeed have to remove
/usr/lib or /lib when they are added (wrongly, but I don't know if ncbi
does that, I don't think so). -L/usr/X11R6/* shouldn't be problematic 
since that directory doesn't exist on fedora since quite a long time now.


> This is where I have problems building.
> 
> gcc -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -o Psequin -I. -O3
> -I../include  -L../lib -I/usr/X11R6/include -L/lib64 -L/usr/lib64
> -L/usr/X11R6/lib64 -DWIN_MOTIF -UINTERNAL_NCBI_SEQUIN sequin1.c sequin2.c
> sequin3.c sequin4.c sequin5.c sequin6.c sequin7.c sequin8.c sequin9.c sequin10.c
> sequinx.c \
>         -lncbicn3d -lddvlib -lvibnet -lncbidesk -lblastapi -lblast -lncbimmdb \
>         -lncbitxc2 -lncbiid1 -lnetblast -lncbitool -lblastcompadj -lncbimla \
>         -lncbiNacc -lnetentr -lnetcli -lncbicdr -lvibrant -lncbiobj -lncbi
> -L/lib64 -L/usr/lib64 -L/usr/X11R6/lib64 -L/lib64 -L/usr/lib64 -L/lib64
> -L/usr/lib64 -lXmu -Wl,-Bstatic -L/lib64 -L/usr/lib64 -L/lib64 -L/usr/lib64 -lXm
> -Wl,-Bdynamic -lXt -lSM -lICE -lXext -lXp -lX11 -ldl -lm

Indeed, there is a -Wl,-Bstatic -lXm -Wl,-Bdynamic so only libXm is 
compiled statically. (In my rpm I completely short-circuited makedis.csh
and *.ncbi.mk). If you want to use makedis.csh and remove 
the -Wl,-Bstatic and -Wl,-Bdynamic to compile libXm dynamically, 
I think that the best way would be to edit the *.ncbi.mk file 
corresponding with your platform (I guess it is 
platform/linux64.ncbi.mk?) and modify NCBI_DISTVIBLIBS.

If you can compile against a share libXm do you still want a static
version of the library?

Comment 6 Steve Morgan 2008-03-24 15:03:43 UTC
It won't compile against the shared version of libXm. Have you tried to build a
static version of libXm and compile ncbi against that?

Comment 7 Steve Morgan 2008-03-25 17:54:43 UTC
I can compile ncbi without editing one thing on a fresh fedora 7 installation
with NO updates. Should this not be consistent? At what point is the static
library removed from lesstif-devel?

Comment 8 Patrice Dumas 2008-03-25 18:34:39 UTC
It is weird, it looks like the static library was never 
shipped... Are you sure that the libXm.a comes from lesstif-devel?

Comment 9 Patrice Dumas 2008-03-25 18:41:20 UTC
(In reply to comment #6)
> It won't compile against the shared version of libXm. 

Even after removing -Wl,-Bstatic and -Wl,-Bdynamic?

> Have you tried to build a
> static version of libXm and compile ncbi against that?

No.

If you really want a static library I can provide it. Do
you think that something is broken in a shared lesstif?



Comment 10 Bug Zapper 2008-05-14 15:23:45 UTC
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Patrice Dumas 2008-05-14 15:32:57 UTC
Still in rawhide.

Also, after discussing with Hans, the comaintainer who is doing the
real bugfixing work, and since he has things to fix, it seems that
providing static library would lead to some bugfixes not being taken 
into account, so that it is not a very satisfying option.

Comment 12 Bug Zapper 2008-11-26 02:10:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Hans de Goede 2008-12-16 14:19:37 UTC
I'm the Hans Patrice talks about in comment 11, and starting today I've completely taken over lesstif maintainership from Patrice. In general we do not provide static libraries in Fedora, and I see no reason to make an acception for lesstif, so I'm closing this bug.

Note: I think your problem can be fixed by patching the makefiles so they will allow dynamic linking.