PDA

View Full Version : libx11.a on FC8



dgotti
5th September 2008, 08:49 PM
Hey there, I'm new here. I've searched the forums and got nowhere, so I decided to star a thread.

Anyway, my problem is, I need libx11.a in order to run Daospec, which is Fortran-based. But, I can't find it anywhere on my system. I do have libx11.so, but this program only works with .a libraries. Where can I find libx11.a?

Thanks in advance,
Douglas

leigh123linux
5th September 2008, 10:51 PM
http://fedoraforum.org/forum/archive/index.php/t-108049.html


Fedora is moving away from making static
libraries available. I know this is the case with Extras, I think it is
the case with core too.

This is something I personally disagree with, but here is the reasoning
(well, at least one of them):

User compiles software and it links against static library libfoo.a.
vulnerability is found in libfoo, Fedora releases patched libfoo.

But the user built their software against the vulnerable libfoo.a and
did not rebuild it after the update was installed.

Result: user potentially has software with a vulnerability in it.

If possible, you should ask the upstream source of your code to allow it
to link to a shared library.

An alternative is to rebuilt the src.rpm and change it to install the
static library.


I have updated the instructions so it will work with F8


You start by installing the build tools and the dependencies :


su
yum groupinstall "Development Tools"
yum install rpmdevtools pkgconfig xorg-x11-proto-devel xorg-x11-xtrans-devel libxcb-devel libXau-devel libXdmcp-devel

as NON ROOT user:

create an rpmbuild environment in your home directory


rpmdev-setuptree

Then you need to get the appropriate src.rpm - in this case -


yumdownloader --source libX11


as your regular user, not as root, install the src.rpm


rpm -i libX11*rpm

This will put the sources and patches in ~/rpmbuild/SOURCES/

and a spec file in ~/rpmbuild/SPECS/

you need to modify the spec file in ~/rpmbuild/SPECS/ with a text
editor.

1) change the release tag - put a .1
after whatever is there already (Release, not version)

2) depends upon the package. If in %build section, there is

--disable-static

passed to configure, change the --disable-static to --enable-static

Sometimes they way they get rid of static libraries is to simply delete
them in the %install section after install - in which case you need to
remove the lines that delete them.

3) modify the %files sections for the devel subpackage.
Add this to it:

%{_libdir}/*.a

now - you can rebuild the rpm -


cd ~/rpmbuild/SPECS/
rpmbuild -bb libX11.spec

If it complains about missing BuildRequires, you have to install them.
When it finishes, it will put the rpms in

~/rpmbuild/RPMS/arch/

(where arch is i386,x86_64, or ppc)

then upgrade stock libX11 and libX11-devel rpms with what you have
built.

dgotti
6th September 2008, 02:32 AM
Great, I'll try it as soon as I get to work.
Thank you so much. :D

dgotti
8th September 2008, 09:24 PM
It appears that the command "yumdownloader" doesn't work, but I managed to find it on the RPM site, and downloaded it to the Home folder.
However, when I tried to install it, there was this error message:


[douglas@localhost ~]$ rpm -i libX11*rpm
error: Failed dependencies:
libxcb-xlib.so.0 is needed by libX11-1.1.3-4.fc8.i386
libxcb.so.1 is needed by libX11-1.1.3-4.fc8.i386

I downloaded the "libX11-1.1.3-4.fc8.i386.rpm" file. What do I do now?

leigh123linux
8th September 2008, 10:39 PM
It appears that the command "yumdownloader" doesn't work, but I managed to find it on the RPM site, and downloaded it to the Home folder.
However, when I tried to install it, there was this error message:



I downloaded the "libX11-1.1.3-4.fc8.i386.rpm" file. What do I do now?

You was supposed to download the src.rpm i.e source code rpm .


I have built the modified packages for you ! ( my server is down 01:00 - 09:00 GMT , alternative site http://dnmouse.org/fedora/libX11/ )



su
yum install wget
wget http://leigh123.homelinux.com/libX11/libX11-1.1.3-4.1.fc8.i386.rpm
wget http://leigh123.homelinux.com/libX11/libX11-devel-1.1.3-4.1.fc8.i386.rpm
yum --nogpgcheck update libX11-1.1.3-4.1.fc8.i386.rpm libX11-devel-1.1.3-4.1.fc8.i386.rpm

or you could build the modified srpm yourself .

http://leigh123.homelinux.com/libX11/SRPM/libX11-1.1.3-4.1.fc8.src.rpm

or


wget http://leigh123.homelinux.com/libX11/SRPM/libX11-1.1.3-4.1.fc8.src.rpm

dgotti
10th September 2008, 07:32 PM
Thank you for hosting it for me, and sorry for that.
But there's still a problem: I can't find the package libxcb-devel anywhere.

Sorry for bothering you so much, and thank you for your patience with me. I hate being a newbie... :/

leigh123linux
10th September 2008, 07:45 PM
Doesn't yum work ?


Try



su
yum install libxcb-devel

dgotti
10th September 2008, 08:59 PM
Neither yum nor apt work. It appears that the package doesn't exist, look:


[douglas@localhost douglas]# yum install libxcb-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: libxcb-devel
Nothing to do


[douglas@localhost douglas]# apt-get install libxcb-devel
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package libxcb-devel

leigh123linux
10th September 2008, 10:05 PM
Post


rpm -qa |grep libxcb


and


yum repolist all

dgotti
12th September 2008, 07:41 PM
I've tried it, there were no matches for libxcb, so I tried only "libx'. This is the result:


[douglas@localhost ~]$ rpm -qa | grep libx
libxml2-devel-2.6.26-2.1.1
libxslt-1.1.17-1.1
libxml2-python-2.6.26-2.1.1
libxslt-devel-1.1.17-1.1
libxml2-2.6.26-2.1.1
libxkbfile-1.0.3-3.1

Is any of those useful? I'm starting to get frustrated with this...

leigh123linux
12th September 2008, 08:44 PM
Can you post


yum repolist

JohnVV
12th September 2008, 09:08 PM
libxcb
http://www.google.com/linux
http://www.google.com/linux?hl=en&q=libxcb&btnG=Search
download
http://www.linuxfromscratch.org/blfs/view/svn/x/libxcb.html

leigh123linux
12th September 2008, 09:19 PM
libxcb
http://www.google.com/linux
http://www.google.com/linux?hl=en&q=libxcb&btnG=Search
download
http://www.linuxfromscratch.org/blfs/view/svn/x/libxcb.html

It's in the repo !

http://koji.fedoraproject.org/koji/buildinfo?buildID=56934

dgotti
12th September 2008, 09:35 PM
Yum repolist does nothing, it shows this message:


[douglas@localhost douglas]# yum repolist
Loading "installonlyn" plugin

usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache, upgrade, provides, shell, install, whatprovides, groupinstall, update, groupupdate, info, search, check-update, list, remove, clean, grouperase >

options:
-h, --help show this help message and exit
-t, --tolerant be tolerant of errors
-C run entirely from cache, don't update cache
-c [config file] config file location
-R [minutes] maximum command wait time
-d [debug level] debugging output level
-e [error level] error output level
-y answer yes for all questions
--version show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo] enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
-x [package], --exclude=[package]
exclude package(s) by name or glob
--obsoletes enable obsoletes processing during updates
--noplugins disable Yum plugins

Anyway, I downloaded it from the page John sent, what do I do now?

leigh123linux
12th September 2008, 09:43 PM
Yum repolist does nothing, it shows this message:



Anyway, I downloaded it from the page John sent, what do I do now?

Wait for John or use the rpm files !

mgunduz
7th March 2009, 06:22 PM
Hi leigh123@linux ,

I just generated the rpms as you suggest.:)

==============
[gunduz@nola x86_64]$ pwd
/home/gunduz/rpmbuild/RPMS/x86_64
[gunduz@nola x86_64]$ ll
total 6468
-rw-r--r-- 1 gunduz gunduz 1524765 2009-03-07 10:54 libX11-1.1.4-6.fc10.1.x86_64.rpm
-rw-r--r-- 1 gunduz gunduz 3966945 2009-03-07 10:55 libX11-debuginfo-1.1.4-6.fc10.1.x86_64.rpm
-rw-r--r-- 1 gunduz gunduz 1110497 2009-03-07 10:54 libX11-devel-1.1.4-6.fc10.1.x86_64.rpm
================

however, I could not understand this

" then upgrade stock libX11 and libX11-devel rpms with what you have built. "

could you please help how to upgrade the stock?

thank you very much.

leigh123linux
7th March 2009, 06:31 PM
Hi leigh123@linux ,

I just generated the rpms as you suggest.:)

==============
[gunduz@nola x86_64]$ pwd
/home/gunduz/rpmbuild/RPMS/x86_64
[gunduz@nola x86_64]$ ll
total 6468
-rw-r--r-- 1 gunduz gunduz 1524765 2009-03-07 10:54 libX11-1.1.4-6.fc10.1.x86_64.rpm
-rw-r--r-- 1 gunduz gunduz 3966945 2009-03-07 10:55 libX11-debuginfo-1.1.4-6.fc10.1.x86_64.rpm
-rw-r--r-- 1 gunduz gunduz 1110497 2009-03-07 10:54 libX11-devel-1.1.4-6.fc10.1.x86_64.rpm
================

however, I could not understand this

" then upgrade stock libX11 and libX11-devel rpms with what you have built. "

could you please help how to upgrade the stock?

thank you very much.


Try


su
rpm -Uvh --replacefiles --replacepkgs libX11-1.1.4-6.fc10.1.x86_64.rpm libX11-devel-1.1.4-6.fc10.1.x86_64.rpm