SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
just fixed an issue in sbbdep, on Slackware 14.2 we seem to have circular dependencies, now I detect them and this is interesting.
for example
/usr/lib64/libfreetype.so.6.12.3
/usr/lib64/libharfbuzz.so.0.10200.7
they need each other
I think this is broken by and in design , but I can understand this somehow.
I'd like to know what the deal is with this too. I'm not really sure how this would even happen. Did it get built twice and linked against the original copy the second time?
I'd like to know what the deal is with this too. I'm not really sure how this would even happen. Did it get built twice and linked against the original copy the second time?
Even better than that.
You can't build freetype without freetype being installed.
It is absolutely allowed for a library to reference itself.
The linker will happily write in every nonsense I tell it to write in as long as it can find a coresponding elf in the search path. (like an old version of itself, dirty build environment!)
The runtime linker has a dummy firewall against cyclic dependencies, nothing can load more than once, and a library itself will be ignored.
If you define 'absolutely allowed' as 'not absolutely forbidden' than you are, of course, somehow right.
Quote:
Originally Posted by kikinovak
Circular dependencies are a rare beast, but they do happen sometimes. I was just confronted to one with ffmpeg and opencv. What I did to resolve it:
Build opencv without ffmpeg ;
Build ffmpeg against opencv ;
Rebuild opencv against ffmpeg.
Cheers,
Niki
nice story, but has nothing to do with my question.
as written, this is something I can somehow understand, even if this is a clear sing of bad design.
Let me rephrase the questions:
1)
someone is building freetype and tells it to add a -lfreetype to the linker,
What is obviously useless but works by accident because it is, in an older version, already in the search path.
But how does it come there?
How is /usr/lib64/libfreetype.la generated that it puts itself as a dependency in the dependency list?
This looks more like an accident than a well thought solution.
2)
what is the advantage of having freetype as a dependency of harfbuzz?
other distros seem to ship without that cycle, and in open embedded it is explicit disabled for good reasons
3)
so does Slackware really want that, or did it just happen?
Looking at the build scripts, there appears to be a bit of functionality that is in freetype that harfbuzz wants to use. (Otherwise, why would harfbuzz want to use anything out of freetype in the first place?) To fix the circular dependency, you'd have to pull out that bit and put it into a third project that both harfbuzz and freetype can use.
That would require the harfbuzz and freetype teams to communicate with each other.
When trying to build freetype-2.6.3 on system with freetype uninstalled:
Code:
[...]
/usr/bin/grep: /usr/lib64/libfreetype.la: No such file or directory
/usr/bin/sed: can't read /usr/lib64/libfreetype.la: No such file or directory
libtool: error: '/usr/lib64/libfreetype.la' is not a valid libtool archive
config.mk:55: recipe for target '/tmp/freetype-2.6.3/objs/libfreetype.la' failed
make: *** [/tmp/freetype-2.6.3/objs/libfreetype.la] Error 1
[...]
The same thing happens when trying to build version 2.6.5 from -current.
(I tried building those on 14.2).
EDIT:
Version 2.7 fails exactly the same way.
--
Best regards,
Andrzej Telszewski
Last edited by atelszewski; 12-18-2016 at 03:36 AM.
When trying to build freetype-2.6.3 on system with freetype uninstalled:
Code:
[...]
/usr/bin/grep: /usr/lib64/libfreetype.la: No such file or directory
/usr/bin/sed: can't read /usr/lib64/libfreetype.la: No such file or directory
libtool: error: '/usr/lib64/libfreetype.la' is not a valid libtool archive
config.mk:55: recipe for target '/tmp/freetype-2.6.3/objs/libfreetype.la' failed
make: *** [/tmp/freetype-2.6.3/objs/libfreetype.la] Error 1
[...]
To build freetype with freetype uninstalled, you need to uninstall harfbuzz, or add --with-harfbuzz=no (this option can be set to yes|no|auto, auto being the default) into freetype.SlackBuild, as below :
Code:
CFLAGS="$SLKCFLAGS" make setup CFG="--with-harfbuzz=no --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux"
The best would be to add a variable WITH_HARFBUZZ into the slackbuild, like in example below :
Code:
WITH_HARFBUZZ=${WITH_HARFBUZZ:-auto}
CFLAGS="$SLKCFLAGS" make setup CFG="--with-harfbuzz=${WITH_HARFBUZZ} --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux"
Looking at the build scripts, there appears to be a bit of functionality that is in freetype that harfbuzz wants to use. (Otherwise, why would harfbuzz want to use anything out of freetype in the first place?) To fix the circular dependency, you'd have to pull out that bit and put it into a third project that both harfbuzz and freetype can use.
That would require the harfbuzz and freetype teams to communicate with each other.
^this
We fail miserably to make our lives easier in the obvious way.
We alone rise the price of good life, usually for no reason (="stupidity").
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.