Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

gcc: "cannot find -lz cannot find -lcrypto"

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
LeeJunFan
n00b
n00b
User avatar
Posts: 21
Joined: Tue Sep 19, 2006 7:51 pm
Location: Holland
Contact:
Contact LeeJunFan
Website

gcc: "cannot find -lz cannot find -lcrypto"

  • Quote

Post by LeeJunFan » Thu Oct 31, 2013 9:42 am

Hello,

I'm having a hard time getting some 'old' software compiled. To cut a long story short. GCC says "cannot find -lz" and "cannot find -lcrypto".

This happened to me before, but as far as I know, that was simply solved by emerging libcrypto.
But not anymore!

I re-emerged libcrypto++ (where is the normal libcrypto?),
I re-emerged libtool,
I re-emerged gcc,
I emerge zlib,

gcc-config is set to: x86_64-pc-linux-gnu-4.7.3

I added zlib to the USE-variables in /etc/portage/make.conf.

So far no success. :(

Anybody an idea how to solve this issue?

Thanks in advance...
The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.
Top
eyoung100
Veteran
Veteran
User avatar
Posts: 1428
Joined: Fri Jan 23, 2004 10:45 pm

  • Quote

Post by eyoung100 » Thu Oct 31, 2013 3:10 pm

Code: Select all

emerge dev-libs/openssl <-- libcrypto
emerge zlib
emerge -uDN world
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Top
LeeJunFan
n00b
n00b
User avatar
Posts: 21
Joined: Tue Sep 19, 2006 7:51 pm
Location: Holland
Contact:
Contact LeeJunFan
Website

  • Quote

Post by LeeJunFan » Thu Oct 31, 2013 4:05 pm

Nope :(

Although I didn't say. Tried this already.
Now tried it again: Same error: "cannot find -lz" and "cannot find -lcrypto"
The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.
Top
eyoung100
Veteran
Veteran
User avatar
Posts: 1428
Joined: Fri Jan 23, 2004 10:45 pm

  • Quote

Post by eyoung100 » Thu Oct 31, 2013 4:14 pm

LeeJunFan wrote:Nope :(

Although I didn't say. Tried this already.
Now tried it again: Same error: "cannot find -lz" and "cannot find -lcrypto"
What is the old software :?:

If you emerge gentoolkit, it contains equery:

Code: Select all

equery belongs /usr/lib/libcrypto.so*
dev-libs/openssl-1.0.1e-r1(/usr/lib64/libcrypto.so.1.0.0)
equery belongs /usr/lib/libz*
sys-libs/zlib-1.2.7 (/usr/lib64/libz.a)
sys-libs/zlib1.2.7(/usr/lib64/libz.so)
You may need to manually edit the software's configure script to point to the new library location if the old software is not in portage
Last edited by eyoung100 on Thu Oct 31, 2013 4:50 pm, edited 1 time in total.
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Thu Oct 31, 2013 4:46 pm

How about putting a build log with such failure in a pastebin ?
Top
LeeJunFan
n00b
n00b
User avatar
Posts: 21
Joined: Tue Sep 19, 2006 7:51 pm
Location: Holland
Contact:
Contact LeeJunFan
Website

  • Quote

Post by LeeJunFan » Fri Nov 01, 2013 5:45 pm

@eyoung100

The software that I'm trying to compile is rdd-copy, version 2.0.7.
(http://sourceforge.net/projects/rdd/files/rdd/2.0.7/)

Then the equery-output:

Code: Select all

# equery belongs /usr/lib/libcrypto.so* 
 * Searching for /usr/lib/libcrypto.so,/usr/lib/libcrypto.so.1.0.0 ... 
dev-libs/openssl-1.0.1e-r1 (/usr/lib64/libcrypto.so.1.0.0)

# equery belongs /usr/lib/libz* 
 * Searching for /usr/lib/libz.so,/usr/lib/libzip.so,/usr/lib/libzip.so.2,/usr/lib/libzip.so.2.1.0 ... 
dev-libs/libzip-0.11.1 (/usr/lib64/libzip.so.2.1.0)
sys-libs/zlib-1.2.7 (/usr/lib64/libz.so)
BTW: The last line (sys-libs/zlib-1.2.7 (/usr/lib64/libz.so)) wasn't there in first instance. I emerged libzip. But unfortunately that also didn't solve my problem. :( Still the same message after make:

Code: Select all

...
make[2]: Entering directory `/install/rdd-2.0.7/src'
gcc -pedantic -Wno-long-long -g3 -Wall -Wmissing-prototypes -g -O2 -static  -o rdd-copy  rddcopy.o librdd.a -lm -lz -lcrypto 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lcrypto
...

@VoidMage
How about putting a build log with such failure in a pastebin ?
I'm sorry. I don't really know what you mean by that. :oops:
Do you mean the whole output of make?
The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.
Top
eyoung100
Veteran
Veteran
User avatar
Posts: 1428
Joined: Fri Jan 23, 2004 10:45 pm

  • Quote

Post by eyoung100 » Fri Nov 01, 2013 6:09 pm

Why are you compiling from a tarball, when the package exists in portage :?:

Code: Select all

emerge -av app-forensics/rdd
[ebuild N   ]sys-apps-fuse-2.9.2 USE="-static-libs" 547 kB
[ebuild N   ]app-forensics/libewf-20130416:0/2 USE="fuse ssl unicode uuid zlib -debug -ewf -rawio -static-libs" 1,923 kB
[ebuild N  ~]app-forensics/rdd-3.0.4-r1 USE="-debug -doc" 5,759 kB

Total: 3 Packages (3 new), Size of downloads: 8,228 kB

The following keyword changes are necessary to proceed:
(see "package.accept_keywords" in the portage(5) man page for more details)
#required by app-forensics/rdd (argument)
=app-forensics/rdd-3.0.4-r1 ~amd64
<snip>
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Top
LeeJunFan
n00b
n00b
User avatar
Posts: 21
Joined: Tue Sep 19, 2006 7:51 pm
Location: Holland
Contact:
Contact LeeJunFan
Website

  • Quote

Post by LeeJunFan » Fri Nov 01, 2013 8:28 pm

That's version 3.0.4-r1.
And I specifically need version 2.0.7.

BTW: I did check if rdd-3.0.4-r1 emerged correctly. And yes it did.
The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.
Top
eyoung100
Veteran
Veteran
User avatar
Posts: 1428
Joined: Fri Jan 23, 2004 10:45 pm

  • Quote

Post by eyoung100 » Fri Nov 01, 2013 9:16 pm

The error your having maybe why 2.0.7 is no longer in the tree...
libcrypto-0.9.8 was merged into openssl awhile ago, which is why the linker cannot find the file. The linker is looking for libcrypt as if it weren't merged w/ openssl. Same thing goes for -lz

Why do you need 2.0.7 :?:
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Top
LeeJunFan
n00b
n00b
User avatar
Posts: 21
Joined: Tue Sep 19, 2006 7:51 pm
Location: Holland
Contact:
Contact LeeJunFan
Website

  • Quote

Post by LeeJunFan » Fri Nov 01, 2013 10:06 pm

That's a long story.

I'm gonna try to explain briefly.
Basically it's for compatibility reasons. The syntax for calling rdd 3 differs quite a lot from calling rdd 2.
And since a part of our software is a wrapper around version 2, it stopped functioning with version 3.

At the end, it's not the end of the world; I do have a compiled version, 64bit, available, that is already working on my Gentoo machine.
But I just can't stand it, that it doesn't seem to compile on this platform anymore.

I remember those days, that it was the other way around: When CentOS, or even Debian, had troubles (by default) getting stuff compiled; It was always Gentoo that helped us out.

I'm getting old...


Thanks anyways everybody!
The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Sat Nov 02, 2013 1:11 am

Going by the line from the build log, you've quoted, for whatever silly reason that rdd-2.0.7 thing wants static libz and libcrypto.
Probably the sanest solution is to find the switch in the build system for that or to patch the dumb thing out.
Top
LeeJunFan
n00b
n00b
User avatar
Posts: 21
Joined: Tue Sep 19, 2006 7:51 pm
Location: Holland
Contact:
Contact LeeJunFan
Website

  • Quote

Post by LeeJunFan » Sat Nov 02, 2013 10:18 am

VoidMage wrote:Going by the line from the build log, you've quoted, for whatever silly reason that rdd-2.0.7 thing wants static libz and libcrypto.
Probably the sanest solution is to find the switch in the build system for that or to patch the dumb thing out.
But I guess, if I do want to patch this, I have to that in the Makefile or the configure-script right?
Too bad. That is a little bit too far away of my abilities. :)
The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.
Top
lagalopex
Guru
Guru
User avatar
Posts: 567
Joined: Sat Oct 16, 2004 10:48 am

  • Quote

Post by lagalopex » Sat Nov 02, 2013 10:51 am

VoidMage wrote:Going by the line from the build log, you've quoted, for whatever silly reason that rdd-2.0.7 thing wants static libz and libcrypto.
Both libs (openssl and zlib) do have a "static-libs" use flags...
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Sat Nov 02, 2013 3:10 pm

lagalopex wrote:
VoidMage wrote:Going by the line from the build log, you've quoted, for whatever silly reason that rdd-2.0.7 thing wants static libz and libcrypto.
Both libs (openssl and zlib) do have a "static-libs" use flags...
Likely so, but changing that setting in the build system is the better solution, IMHO.
Top
Post Reply

14 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic