LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-03-2009, 01:46 PM   #1
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
How to compile gettext without libacl?


I am desperately trying to get gettext to compile without linking to libacl and libattr (which I reckon is linked because of libacl).

Problem is as follows: I am working on my own distribution which is derived from LFS. Thus I first install a chroot-environment in order to then install the actual system.

Now the problem is that gettext obviously has linked to libacl on the host-system, which sucks as that lib of course is not available after chrooting and thus gettext fails to work (which right now prevents gcc from building).
So I had a look through the options of configure and didn't find anything. I had a look through the source and in different places tried to disable the use of libacl, without success.

Whatever I try, it still links against libacl and libattr. I know it can work without, if libacl simply isn't installed.
I even tried renaming /usr/include/acl/libacl.h, but it still links in libacl...

I just tried renaming the actual libraries on the host-system, but that pretty much disables the system as the coreutils rely on their presence.

So right now I am stuck and hope that somebody here can help me with some information on how to build gettext without linking in libacl on a system that uses libacl.
 
Old 05-03-2009, 07:59 PM   #2
map250r
Member
 
Registered: Aug 2007
Distribution: Debian Squeeze
Posts: 46

Rep: Reputation: 15
Since it's from fsf, I'm sure it uses a configure script and a makefile.

Assuming you have completion turned on in bash, have you tried
Code:
./configure --<tab><tab>
This should give you a list of options. If not, open the configure file in an editor and search for "with" "without" "enable" or "disable", or try one of the following:
Code:
--without-libacl
--disable-libacl
--enable-libacl=no
If those fail, replace libacl with acl and try again.

I looked in fsf's documentation for gettext but it doesn't say anything about compiling. Have you looked in the documentation that comes with the source, i.e. README, INSTALL, etc?
 
Old 05-03-2009, 08:07 PM   #3
map250r
Member
 
Registered: Aug 2007
Distribution: Debian Squeeze
Posts: 46

Rep: Reputation: 15
Another thought. Your chroot may not be set up right. You should be able to set up your chroot so that your real /lib shows up, but stuff like headers doesn't. IIRC it's done with mount, but I don't remember the command. See what mount says if you try
Code:
mount /lib ~/chroot/lib
It might give a hint as to the proper options.

Or look through some chroot howtos.

Once you get /lib set up, you shouldn't have any trouble using whichever programs you need.

Renaming a single header won't always help; there are often multiple versions AFAIK.
 
Old 05-04-2009, 01:44 AM   #4
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Original Poster
Rep: Reputation: 41
I checked the included documentation (README, INSTALL, DEPENDENCIES) and none of them mentions acl at all.
Also I looked at the options of configure, but nothing there either.

I found one M4-script which seems to check for the existence of libacl and then should set use_acl to either 1 (if it's there, or 0). I changed that script to always set 0, but still it gets linked in.

After running configure I edited a config.h (don't remember the location, I think it was under gettext-tools) and #undef-ed a value that should cause the use of libacl. Didn't help either.

Last night I even tried to compile the whole thing with LDFLAGS="-static", but I didn't even get any static binaries. May have to try to enforce this in the makefiles.

I tried --without-libacl, but didn't help either. Will check the other options and also without "lib", like --without-acl, etc.

As for the chroot-environment. Currently I am actually at a loss why this happens at all.
Just thought about it and this didn't happen when I installed the system from the LiveCD, which also has libacl installed. There it didn't do this.
The only difference I can currently tell is that the host-system's compiler is GCC 4.3.3 on the LiveCD, but on the system it's GCC 4.4.0.

Well, currently I am running another build (in an installed system) and will see later what happens.

Anyway, thanks for your thoughts. If anybody still got any idea I'd appreciate reading it.
 
Old 05-05-2009, 02:49 PM   #5
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Original Poster
Rep: Reputation: 41
Okay, after letting the problem rest for a short while I got back to it and tried a combination of something I had tried before.

This time I edited gettext-tools/config.h and some makefiles, and it now seems to work quite nicely without linking in libacl.

If anybody ever runs into this problem here's how I do it:
  • Run ./configure
  • Code:
    sed -i 's@#define.*_ACL.*@/*&*/@g' gettext-tools/config.h
  • Code:
    for FILE in $(find . -name Makefile); do
     sed -i 's@-lacl@@g' ${FILE}
    done
  • Build gettext

This seems to "fix" my "problem". But still I guess I may have to get back to checking why this happened in the first place.
 
Old 06-08-2009, 07:59 PM   #6
dexodro
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
I was just asking over IRC the other day about this very problem. The response was that it was probably picked up from the host partition ( Gentoo ). Thank you for posting this. It worked for me
 
Old 07-15-2009, 04:05 PM   #7
tag
LQ Newbie
 
Registered: Jan 2007
Location: Boston MA
Distribution: Ubuntu 9.10, Debian 5, Wolvix 2, Slackware 12
Posts: 14

Rep: Reputation: 0
I am running Wolvix GNU/Linux 2.0.

I have run into this issue compiling a basic ( very basic ) LFS 6.4. Ran into the ACL issue on the gcc compile. It seams as though acl is needed for the coreutils, acl is used for ls and a few other very fundamental tools.

My reflex was to compile coreutils for the target again, then build after GCC makes it through. Turns out another package provides the .so dynamic lib, and this did not solve anything. I wonder where ACL is provided? Perhaps it's another package.

I have run your patch on gettext, checked it, and installed it. Outstanding work on that solution, but I wonder what causes this issue? Interesting. Perhaps compiling the toolchain against my host caused it to want to link to acl, and that propagated down.

GCC compiled great, moved right through where it hung up.

Everything seems great. I'll post here if I catch another related issue ( for posterity )

Cheers,
Tag
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is libacl.so.1 ? hottdogg Slackware 3 12-21-2006 01:44 AM
missing libacl! Lord Zoltar Slackware 2 04-08-2006 04:22 PM
vim, libacl and libattr in -current hussar Slackware 7 03-28-2006 02:43 PM
Gettext Compile error during 'make' tcom Linux From Scratch 3 11-13-2005 11:29 AM
Compile gettext with GCJ Prop_idze Linux - Software 2 09-26-2005 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration