LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-30-2018, 03:02 AM   #1
cycojesus
Member
 
Registered: Dec 2005
Location: Lyon, France
Distribution: Slackware-current
Posts: 41

Rep: Reputation: 13
Missing static libraries (pcre, ssl & crypto)


I have a crystal project that I need to statically compile to deploy. Unfortunately 3 libraries seem to be missing:
Code:
$ crystal build --static app.cr
/usr/bin/ld: cannot find -lssl (this usually means you need to install the development package for libssl)
/usr/bin/ld: cannot find -lcrypto (this usually means you need to install the development package for libcrypto)
/usr/bin/ld: cannot find -lpcre (this usually means you need to install the development package for libpcre)
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/cycojesus/projets/Erasme/discourse_GrandLyon_gateway/app'  -rdynamic -static  -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lpcre -lm -lgc -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`
(code is @ https://github.com/Lyon-Metropole/di...dLyon_gateway/ and a crystal SlackBuild is @ https://github.com/gwenhael-le-moine...tal/SlackBuild )
 
Old 08-30-2018, 03:12 AM   #2
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,750

Rep: Reputation: Disabled
openssl.SlackBuild contains these lines
Code:
# No thanks on the static libraries:
rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/*.a
while pcre.SlackBuild passes this option to configure
Code:
  --disable-static \
if you delete them and rebuild/reinstall the above packages you can have the static libraries you need.
 
1 members found this post helpful.
Old 08-30-2018, 04:03 AM   #3
cycojesus
Member
 
Registered: Dec 2005
Location: Lyon, France
Distribution: Slackware-current
Posts: 41

Original Poster
Rep: Reputation: 13
Quote:
Originally Posted by ponce View Post
openssl.SlackBuild contains these lines
Code:
# No thanks on the static libraries:
rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/*.a
while pcre.SlackBuild passes this option to configure
Code:
  --disable-static \
if you delete them and rebuild/reinstall the above packages you can have the static libraries you need.
Thank you for pushing me in the right direction.

I had found the pcre change. For openssl though it's not enough and I ended up copying
Code:
 /tmp/openssl-1.1.0i/libssl.a /tmp/openssl-1.1.0i/libcrypto.a
to /usr/lib64 manually

Then I also had to recompile libevent without
Code:
  --disable-static \
and finally I got a statically compiled binary that runs on an ubuntu 16.04

It's solved for now but I'm not fond of tampering with official packages. I'd rather these packages bundle the static libraries officially.
 
Old 08-30-2018, 05:10 AM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,750

Rep: Reputation: Disabled
Quote:
Originally Posted by cycojesus View Post
It's solved for now but I'm not fond of tampering with official packages. I'd rather these packages bundle the static libraries officially.
in general that might not be a good idea because $REASONS: please have a look at this

http://www.linuxfromscratch.org/blfs...libraries.html
 
1 members found this post helpful.
  


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
Thread limits in dynamic libraries as opposed to static libraries pmkenny1234 Linux - Software 0 04-26-2011 02:22 PM
LXer: Install Nginx On CentOS 5.5 With SSL, PCRE, GeoIP, Zlib, Gzip And DAV Support LXer Syndicated Linux News 0 09-20-2010 04:10 PM
Static libraries vs shared Libraries catallergy Linux - Newbie 2 03-16-2010 01:30 PM
help installing snort: pcre header missing cynthia_thomas Linux - Networking 1 11-07-2005 11:19 AM
Intel USB Webcam & "missing shared libraries: libgd.so.1.8" leavingwindows Linux - Newbie 1 10-29-2003 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:04 PM.

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