pkg 1.15.10 failed

ahgu

New Member


Messages: 12

First the openssl1.1.1 has deprecated a lot of functions. I get the following error. so I used libressl instead.
Code:
cc -o pkg-static add.o alias.o annotate.o audit.o autoremove.o backup.o check.o clean.o config.o create.o delete.o event.o fetch.o globals.o info.o install.o lock.o main.o plugins.o query.o register.o repo.o rquery.o search.o set.o shell.o shlib.o ssh.o stats.o update.o updating.o upgrade.o utils.o version.o which.o -static  -fstack-protector-strong  -L/usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg -lpkg_flat  -lelf -ljail -larchive -lbz2 -lz -llzma -lprivatezstd -lm -lssl -lcrypto -pthread -lutil -lmd
--- pkg ---
ld: error: undefined symbol: SSL_library_init
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSL_load_error_strings
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSLv23_client_method
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: sk_num
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: sk_value
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: sk_num
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSL_load_error_strings
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify_cert) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OPENSSL_add_all_algorithms_noconf
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify_cert) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OpenSSL_add_all_ciphers
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify_cert) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSL_load_error_strings
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OPENSSL_add_all_algorithms_noconf
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a
ld: error: undefined symbol: OpenSSL_add_all_ciphers
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a
ld: error: undefined symbol: SSL_load_error_strings
>>> referenced by rsa.c
>>>               rsa.o:(rsa_new) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OPENSSL_add_all_algorithms_noconf
>>> referenced by rsa.c
>>>               rsa.o:(rsa_new) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OpenSSL_add_all_ciphers
>>> referenced by rsa.c
>>>               rsa.o:(rsa_new) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: ERR_free_strings
>>> referenced by rsa.c
>>>               rsa.o:(rsa_free) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [pkg] Error code 1

make[4]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/src
--- pkg-static ---
ld: error: undefined symbol: SSL_load_error_strings
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify_cert) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OPENSSL_add_all_algorithms_noconf
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify_cert) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OpenSSL_add_all_ciphers
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify_cert) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSL_load_error_strings
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OPENSSL_add_all_algorithms_noconf
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OpenSSL_add_all_ciphers
>>> referenced by rsa.c
>>>               rsa.o:(rsa_verify) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSL_load_error_strings
>>> referenced by rsa.c
>>>               rsa.o:(rsa_new) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: OPENSSL_add_all_algorithms_noconf
>>> referenced by rsa.c
>>>               rsa.o:(rsa_new) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a
ld: error: undefined symbol: OpenSSL_add_all_ciphers
>>> referenced by rsa.c
>>>               rsa.o:(rsa_new) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: ERR_free_strings
>>> referenced by rsa.c
>>>               rsa.o:(rsa_free) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSL_library_init
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSL_load_error_strings
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: SSLv23_client_method
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: sk_num
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: sk_value
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a

ld: error: undefined symbol: sk_num
>>> referenced by common.c
>>>               common.o:(fetch_ssl) in archive /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg/libpkg_flat.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [pkg-static] Error code 1

make[4]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/src
2 errors

make[4]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/src
*** [all] Error code 2

make[3]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10
1 error

make[3]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make: stopped in /usr/ports/ports-mgmt/pkg

===>>> make build failed for ports-mgmt/pkg
===>>> Aborting update

===>>> Update for pkg-1.15.9 failed
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> ports-mgmt/portdowngrade devel/subversion devel/pkgconf ports-mgmt/pkg textproc/utf8proc www/serf devel/scons@py37

This command has been saved to ~/portmasterfail.txt
I added -L /usr/local/lib in the Makefile

then I get this error:
Code:
cc -o pkg add.o alias.o annotate.o audit.o autoremove.o backup.o check.o clean.o config.o create.o delete.o event.o fetch.o globals.o info.o install.o lock.o main.o plugins.o query.o register.o repo.o rquery.o search.o set.o shell.o shlib.o ssh.o stats.o update.o updating.o upgrade.o utils.o version.o which.o  -fstack-protector-strong  -Wl,-Bstatic  -Wl,-whole-archive -L/usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg -lpkg_flat -Wl,-no-whole-archive    -Wl,-Bdynamic -lelf -ljail -L/usr/local/lib -larchive -lbz2 -lz -llzma -lprivatezstd -lm -lssl -lcrypto -pthread -lutil -lmd  -Wl,--export-dynamic
--- pkg-static ---
cc -o pkg-static add.o alias.o annotate.o audit.o autoremove.o backup.o check.o clean.o config.o create.o delete.o event.o fetch.o globals.o info.o install.o lock.o main.o plugins.o query.o register.o repo.o rquery.o search.o set.o shell.o shlib.o ssh.o stats.o update.o updating.o upgrade.o utils.o version.o which.o -static  -fstack-protector-strong  -L/usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/libpkg -lpkg_flat  -lelf -ljail -L/usr/local/lib -larchive -lbz2 -lz -llzma -lprivatezstd -lm -lssl -lcrypto -pthread -lutil -lmd
ld: error: undefined symbol: LZ4_decompress_safe
>>> referenced by archive_read_support_filter_lz4.o:(lz4_filter_read_default_stream) in archive /usr/local/lib/libarchive.a

ld: error: undefined symbol: LZ4_decompress_safe_usingDict
>>> referenced by archive_read_support_filter_lz4.o:(lz4_filter_read_default_stream) in archive /usr/local/lib/libarchive.a

ld: error: undefined symbol: LZ4_decompress_safe
>>> referenced by archive_read_support_filter_lz4.o:(lz4_filter_read_legacy_stream) in archive /usr/local/lib/libarchive.a

ld: error: undefined symbol: lzo1x_decompress_safe
>>> referenced by archive_read_support_filter_lzop.o:(lzop_filter_read) in archive /usr/local/lib/libarchive.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [pkg-static] Error code 1

make[4]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/src
1 error

make[4]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10/src
*** [all] Error code 2

make[3]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10
1 error

make[3]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.15.10
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make: stopped in /usr/ports/ports-mgmt/pkg

then I added the this in src/Makefile
OTHER_LIBS+=    -L/usr/local/lib -larchive -lbz2 -lz -llzma -lprivatezstd -llz4 -llzo2
OTHER_LIBS+=    -lm -lssl -lcrypto -pthread
OTHER_LIBS+=    -lutil
OTHER_LIBS+=    -lmd
Now it is compiling, please fix.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,332
Messages: 33,894

Works just fine with OpenSSL 1.1.1 from the base:
Code:
root@molly:~ # openssl version
OpenSSL 1.1.1h-freebsd  22 Sep 2020
root@molly:~ # pkg -v
1.15.10
 

chrcol

Well-Known Member

Reaction score: 41
Messages: 436

What is your openssl configuration, ports or server? and if ports which version is installed, and also what version of FreeBSD are you on?
 
Top