Errors when adding NetCDF
For a project I need to process GRIB and NetCDF files. I can read the GRIB files but for the NetCDF files I have to add a driver. But when I compile it for unix I get the following error after running make -f gdal-makefile:
./.libs/libproj.so: undefined reference to `curl_easy_getinfo'
./.libs/libproj.so: undefined reference to `curl_easy_setopt'
./.libs/libproj.so: undefined reference to `curl_easy_init'
./.libs/libproj.so: undefined reference to `curl_easy_perform'
./.libs/libproj.so: undefined reference to `curl_easy_cleanup'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1394: proj] Error 1
make[4]: Leaving directory '/root/gdal.netcore/build-unix/proj-source/src'
make[3]: *** [Makefile:884: all] Error 2
make[3]: Leaving directory '/root/gdal.netcore/build-unix/proj-source/src'
make[2]: *** [Makefile:450: all-recursive] Error 1
make[2]: Leaving directory '/root/gdal.netcore/build-unix/proj-source'
make[1]: *** [gdal-makefile:172: build_proj] Error 2
make[1]: Leaving directory '/root/gdal.netcore/unix'
make: *** [gdal-makefile:42: proj] Error `2`
I've installed CentOS7 on WSDL2 (from here) and after that I've followed the instructions which are mentioned here.
It might be caused by permission issues because at the beginning I get the following errors:
./configure: line 18494: /root/gdal.netcore/unix/../build-unix/vcpkg/installed/x64-linux-dynamic/share/curl/curl-config: Permission denied
./configure: line 18495: /root/gdal.netcore/unix/../build-unix/vcpkg/installed/x64-linux-dynamic/share/curl/curl-config: Permission denied
found libcurl version
checking for curl_global_init in -lcurl... ./configure: line 18506: /root/gdal.netcore/unix/../build-unix/vcpkg/installed/x64-linux-dynamic/share/curl/curl-config: Permission denied
yes
./configure: line 18550: /root/gdal.netcore/unix/../build-unix/vcpkg/installed/x64-linux-dynamic/share/curl/curl-config: Permission denied
./configure: line 18551: /root/gdal.netcore/unix/../build-unix/vcpkg/installed/x64-linux-dynamic/share/curl/curl-config: Permission denied
I'm logged in as the root user and I cloned the source in the /root folder.
Besides that, I had to manually install patchelf by using yum -y install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/p/patchelf-0.12-1.el7.x86_64.rpm
Can you help me getting the compilation to work for me and possibly give me some directions to add the NetCDF driver?
The permissions problems have to do with curl-config not getting executable flag.. not sure why, seems like a clear bug somewhere. Workaround is to set it manually i.e chmod +x gdal.netcore/build-unix/vcpkg/installed/x64-linux-dynamic/share/curl/curl-config.
Thanks for the quick reply. Manually chmod the folder did the trick.
About permissions, try to run a command with sudo, e.g. sudo make -f gdal-makefile or change working directory.
NetCDF driver (also libkml, hdfs3) requires boost dependencies, that's more than 140 additional packages. Just start with shared/GdalCore.opt. Enable driver in config, rebuild VCPKG's packages and try to build GDAL bindings.
Closing due to inactivity.
Due to holidays and finishing projects I wasn't able to work on this for a while. However, this week I had some time.
I've added netcdf-c to the VCPKG_REQUIRE line (shared/GdalCore.opt):
VCPKG_REQUIRE=tiff expat xerces-c libpng libiconv zlib netcdf-c
After that I've installed the netcdf-devel library:
yum install netcdf-devel -y
The following libraries are now installed:
Package xz-devel-5.2.2-1.el7.x86_64 already installed and latest version
Package hdf-devel-4.2.13-1.el7.x86_64 already installed and latest version
Package hdf5-devel-1.8.12-12.el7.x86_64 already installed and latest version
Package libtiff-4.0.3-35.el7.x86_64 already installed and latest version
Package sqlite-devel-3.7.17-8.el7_7.1.x86_64 already installed and latest version
Package expat-2.1.0-12.el7.x86_64 already installed and latest version
Package libcurl-devel-7.29.0-59.el7_9.1.x86_64 already installed and latest version
Package netcdf-devel-4.3.3.1-5.el7.x86_64 already installed and latest version
I've enabled the driver in the GDAL config (gdal-makefile):
--with-netcdf=${VCPKG_INSTALLED} \
Rebuilding all the packages with make -f vcpkg-makefile was successful:
Logs (spoiler)
The following packages are already installed:
tiff[core]:x64-linux -> 4.1.0#1
Package tiff:x64-linux is already installed
Total elapsed time: 12.5 us
Computing installation plan...
The following packages are already installed:
expat[core]:x64-linux -> 2020-08-18
Package expat:x64-linux is already installed
Total elapsed time: 14.5 us
The package expat:x64-linux provides CMake targets:
find_package(expat CONFIG REQUIRED)
target_link_libraries(main PRIVATE expat::expat)
Computing installation plan...
The following packages are already installed:
xerces-c[core]:x64-linux -> 3.2.3-1
Package xerces-c:x64-linux is already installed
Total elapsed time: 12.2 us
The package xerces-c:x64-linux provides CMake targets:
find_package(XercesC CONFIG REQUIRED)
target_link_libraries(main PRIVATE xerces_xerces-c XercesC::XercesC)
Computing installation plan...
The following packages are already installed:
libpng[core]:x64-linux -> 1.6.37#14
Package libpng:x64-linux is already installed
Total elapsed time: 12.4 us
The package libpng:x64-linux provides CMake targets:
find_package(libpng CONFIG REQUIRED)
target_link_libraries(main PRIVATE png_static)
Computing installation plan...
The following packages are already installed:
libiconv[core]:x64-linux -> 1.16#7
Package libiconv:x64-linux is already installed
Total elapsed time: 13.1 us
Computing installation plan...
The following packages are already installed:
zlib[core]:x64-linux -> 1.2.11#9
Package zlib:x64-linux is already installed
Total elapsed time: 12.6 us
The package zlib is compatible with built-in CMake targets:
find_package(ZLIB REQUIRED)
target_link_libraries(main PRIVATE ZLIB::ZLIB)
Computing installation plan...
The following packages are already installed:
netcdf-c[core]:x64-linux -> 4.7.4#1
Package netcdf-c:x64-linux is already installed
Total elapsed time: 14.2 us
The package netcdf-c provides CMake targets:
find_package(netCDF CONFIG REQUIRED)
target_link_libraries(main PRIVATE netcdf)
Computing installation plan...
The following packages are already installed:
sqlite3[core]:x64-linux -> 3.33.0
Package sqlite3:x64-linux is already installed
Total elapsed time: 16.7 us
The package sqlite3:x64-linux provides CMake targets:
find_package(unofficial-sqlite3 CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
Computing installation plan...
The following packages are already installed:
hdf5[core,szip,zlib]:x64-linux-dynamic -> 1.12.0
Package hdf5:x64-linux-dynamic is already installed
Total elapsed time: 13.5 us
The package hdf5:x64-linux-dynamic provides CMake targets:
find_package(hdf5 CONFIG REQUIRED)
target_link_libraries(main PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared)
Computing installation plan...
The following packages are already installed:
curl[core,non-http,openssl,ssl]:x64-linux-dynamic -> 7.74.0#2
Package curl:x64-linux-dynamic is already installed
Total elapsed time: 34.9 us
The package curl:x64-linux-dynamic provides CMake targets:
find_package(CURL CONFIG REQUIRED)
target_link_libraries(main PRIVATE CURL::libcurl)
Computing installation plan...
The following packages are already installed:
libpq[core,openssl,zlib]:x64-linux-dynamic -> 12.2#10
Package libpq:x64-linux-dynamic is already installed
But when I run make -f gdal-makefile I get the following error:
Logs (spoiler)
libtool: link: g++ -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Weffc++ -Woverloaded-virtual -Wdeprecated -Wzero-as-null-pointer-constant -g -O2 -fvisibility=hidden -o .libs/proj apps/proj.o apps/emess.o apps/utils.o ./.libs/libproj.so -L/opt/gdal.netcore/unix/../build-unix/vcpkg/installed/x64-linux/lib -L/opt/gdal.netcore/build-unix/vcpkg/installed/x64-linux-dynamic/lib -lcurl -lpthread -ldl -lm -lsqlite3 -ltiff -llzma -ljpeg -lz -Wl,-rpath -Wl,/opt/gdal.netcore/unix/../build-unix/proj-build/lib
./.libs/libproj.so: undefined reference to `OPENSSL_sk_num'
./.libs/libproj.so: undefined reference to `SSL_set_ex_data'
./.libs/libproj.so: undefined reference to `BIO_new_mem_buf'
./.libs/libproj.so: undefined reference to `SSL_connect'
./.libs/libproj.so: undefined reference to `X509_check_issued'
./.libs/libproj.so: undefined reference to `SSL_set_bio'
./.libs/libproj.so: undefined reference to `EVP_PKEY_id'
./.libs/libproj.so: undefined reference to `EVP_DigestInit'
./.libs/libproj.so: undefined reference to `BIO_free'
./.libs/libproj.so: undefined reference to `BIO_s_mem'
./.libs/libproj.so: undefined reference to `UI_method_get_reader'
./.libs/libproj.so: undefined reference to `UI_get_string_type'
./.libs/libproj.so: undefined reference to `BIO_ctrl'
./.libs/libproj.so: undefined reference to `DES_set_odd_parity'
./.libs/libproj.so: undefined reference to `OCSP_resp_find_status'
./.libs/libproj.so: undefined reference to `UI_get0_user_data'
./.libs/libproj.so: undefined reference to `X509_get0_notAfter'
./.libs/libproj.so: undefined reference to `BN_num_bits'
./.libs/libproj.so: undefined reference to `ENGINE_get_next'
./.libs/libproj.so: undefined reference to `EVP_PKEY_get0_DH'
./.libs/libproj.so: undefined reference to `MD4_Update'
./.libs/libproj.so: undefined reference to `ASN1_STRING_to_UTF8'
./.libs/libproj.so: undefined reference to `GENERAL_NAMES_free'
./.libs/libproj.so: undefined reference to `PKCS12_free'
./.libs/libproj.so: undefined reference to `EVP_PKEY_get0_RSA'
./.libs/libproj.so: undefined reference to `SSL_set_session'
./.libs/libproj.so: undefined reference to `ASN1_STRING_length'
./.libs/libproj.so: undefined reference to `ENGINE_get_first'
./.libs/libproj.so: undefined reference to `UI_OpenSSL'
./.libs/libproj.so: undefined reference to `UI_method_get_closer'
./.libs/libproj.so: undefined reference to `EVP_sha256'
./.libs/libproj.so: undefined reference to `CRYPTO_get_ex_new_index'
./.libs/libproj.so: undefined reference to `X509_NAME_get_index_by_NID'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_verify'
./.libs/libproj.so: undefined reference to `UI_method_set_writer'
./.libs/libproj.so: undefined reference to `SSL_SESSION_free'
./.libs/libproj.so: undefined reference to `RAND_load_file'
./.libs/libproj.so: undefined reference to `PEM_read_bio_PrivateKey'
./.libs/libproj.so: undefined reference to `MD5_Init'
./.libs/libproj.so: undefined reference to `SSL_ctrl'
./.libs/libproj.so: undefined reference to `OPENSSL_init_ssl'
./.libs/libproj.so: undefined reference to `UI_method_get_opener'
./.libs/libproj.so: undefined reference to `MD5_Final'
./.libs/libproj.so: undefined reference to `UI_method_set_closer'
./.libs/libproj.so: undefined reference to `CRYPTO_malloc'
./.libs/libproj.so: undefined reference to `X509_STORE_set_flags'
./.libs/libproj.so: undefined reference to `PKCS12_PBE_add'
./.libs/libproj.so: undefined reference to `SSL_CTX_check_private_key'
./.libs/libproj.so: undefined reference to `SSL_CTX_use_certificate_chain_file'
./.libs/libproj.so: undefined reference to `OCSP_cert_to_id'
./.libs/libproj.so: undefined reference to `OCSP_BASICRESP_free'
./.libs/libproj.so: undefined reference to `SSL_get_peer_certificate'
./.libs/libproj.so: undefined reference to `BIO_new'
./.libs/libproj.so: undefined reference to `BIO_f_ssl'
./.libs/libproj.so: undefined reference to `X509_get_subject_name'
./.libs/libproj.so: undefined reference to `SSL_free'
./.libs/libproj.so: undefined reference to `OCSP_RESPONSE_free'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_keylog_callback'
./.libs/libproj.so: undefined reference to `ERR_clear_error'
./.libs/libproj.so: undefined reference to `X509_NAME_get_entry'
./.libs/libproj.so: undefined reference to `SHA256_Init'
./.libs/libproj.so: undefined reference to `OpenSSL_version_num'
./.libs/libproj.so: undefined reference to `OCSP_basic_verify'
./.libs/libproj.so: undefined reference to `OPENSSL_sk_pop_free'
./.libs/libproj.so: undefined reference to `PEM_read_bio_X509'
./.libs/libproj.so: undefined reference to `BIO_puts'
./.libs/libproj.so: undefined reference to `i2t_ASN1_OBJECT'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_alpn_protos'
./.libs/libproj.so: undefined reference to `SSL_CTX_add_client_CA'
./.libs/libproj.so: undefined reference to `SSL_get_certificate'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_default_passwd_cb_userdata'
./.libs/libproj.so: undefined reference to `CRYPTO_free'
./.libs/libproj.so: undefined reference to `X509_get_ext_d2i'
./.libs/libproj.so: undefined reference to `d2i_OCSP_RESPONSE'
./.libs/libproj.so: undefined reference to `SSL_set_connect_state'
./.libs/libproj.so: undefined reference to `SSL_CTX_new'
./.libs/libproj.so: undefined reference to `OCSP_response_status'
./.libs/libproj.so: undefined reference to `SSL_get_verify_result'
./.libs/libproj.so: undefined reference to `OCSP_response_status_str'
./.libs/libproj.so: undefined reference to `X509_load_crl_file'
./.libs/libproj.so: undefined reference to `UI_create_method'
./.libs/libproj.so: undefined reference to `SSL_read'
./.libs/libproj.so: undefined reference to `RAND_bytes'
./.libs/libproj.so: undefined reference to `SSL_set_fd'
./.libs/libproj.so: undefined reference to `SSL_CTX_use_PrivateKey'
./.libs/libproj.so: undefined reference to `X509_NAME_print_ex'
./.libs/libproj.so: undefined reference to `SSL_pending'
./.libs/libproj.so: undefined reference to `OPENSSL_sk_pop'
./.libs/libproj.so: undefined reference to `X509_verify_cert_error_string'
./.libs/libproj.so: undefined reference to `SSL_get_current_cipher'
./.libs/libproj.so: undefined reference to `OPENSSL_sk_value'
./.libs/libproj.so: undefined reference to `UI_destroy_method'
./.libs/libproj.so: undefined reference to `ENGINE_load_private_key'
./.libs/libproj.so: undefined reference to `X509_get0_signature'
./.libs/libproj.so: undefined reference to `RSA_free'
./.libs/libproj.so: undefined reference to `OCSP_crl_reason_str'
./.libs/libproj.so: undefined reference to `X509_LOOKUP_file'
./.libs/libproj.so: undefined reference to `ENGINE_finish'
./.libs/libproj.so: undefined reference to `RAND_add'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_post_handshake_auth'
./.libs/libproj.so: undefined reference to `SSL_CTX_load_verify_locations'
./.libs/libproj.so: undefined reference to `SSL_alert_desc_string_long'
./.libs/libproj.so: undefined reference to `X509_get0_extensions'
./.libs/libproj.so: undefined reference to `SSL_CIPHER_get_name'
./.libs/libproj.so: undefined reference to `ASN1_STRING_type'
./.libs/libproj.so: undefined reference to `ENGINE_get_id'
./.libs/libproj.so: undefined reference to `ERR_peek_last_error'
./.libs/libproj.so: undefined reference to `ERR_get_error'
./.libs/libproj.so: undefined reference to `i2a_ASN1_OBJECT'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_options'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_ciphersuites'
./.libs/libproj.so: undefined reference to `OCSP_cert_status_str'
./.libs/libproj.so: undefined reference to `EVP_PKEY_free'
./.libs/libproj.so: undefined reference to `SSL_get_privatekey'
./.libs/libproj.so: undefined reference to `RAND_file_name'
./.libs/libproj.so: undefined reference to `ENGINE_ctrl_cmd'
./.libs/libproj.so: undefined reference to `ERR_peek_error'
./.libs/libproj.so: undefined reference to `EVP_MD_CTX_free'
./.libs/libproj.so: undefined reference to `SSL_CTX_use_PrivateKey_file'
./.libs/libproj.so: undefined reference to `SHA256_Update'
./.libs/libproj.so: undefined reference to `OCSP_check_validity'
./.libs/libproj.so: undefined reference to `UI_method_set_opener'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_default_passwd_cb'
./.libs/libproj.so: undefined reference to `SSL_CTX_use_certificate_file'
./.libs/libproj.so: undefined reference to `X509V3_EXT_print'
./.libs/libproj.so: undefined reference to `MD5_Update'
./.libs/libproj.so: undefined reference to `SHA256_Final'
./.libs/libproj.so: undefined reference to `SSL_get_ex_data'
./.libs/libproj.so: undefined reference to `EVP_PKEY_get0_DSA'
./.libs/libproj.so: undefined reference to `SSL_CTX_sess_set_new_cb'
./.libs/libproj.so: undefined reference to `UI_method_get_writer'
./.libs/libproj.so: undefined reference to `DSA_get0_key'
./.libs/libproj.so: undefined reference to `RSA_get0_key'
./.libs/libproj.so: undefined reference to `X509_get_pubkey'
./.libs/libproj.so: undefined reference to `X509_get_X509_PUBKEY'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_cipher_list'
./.libs/libproj.so: undefined reference to `BIO_printf'
./.libs/libproj.so: undefined reference to `SSL_new'
./.libs/libproj.so: undefined reference to `SSL_CTX_use_certificate'
./.libs/libproj.so: undefined reference to `X509_get_serialNumber'
./.libs/libproj.so: undefined reference to `UI_get_input_flags'
./.libs/libproj.so: undefined reference to `SSL_write'
./.libs/libproj.so: undefined reference to `X509_get_version'
./.libs/libproj.so: undefined reference to `EVP_PKEY_get1_RSA'
./.libs/libproj.so: undefined reference to `SSL_CTX_get_cert_store'
./.libs/libproj.so: undefined reference to `i2d_X509_PUBKEY'
./.libs/libproj.so: undefined reference to `TLS_client_method'
./.libs/libproj.so: undefined reference to `OCSP_CERTID_free'
./.libs/libproj.so: undefined reference to `OCSP_response_get1_basic'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_msg_callback'
./.libs/libproj.so: undefined reference to `X509_free'
./.libs/libproj.so: undefined reference to `DH_get0_key'
./.libs/libproj.so: undefined reference to `X509_get0_notBefore'
./.libs/libproj.so: undefined reference to `ERR_error_string_n'
./.libs/libproj.so: undefined reference to `BIO_s_file'
./.libs/libproj.so: undefined reference to `DES_set_key'
./.libs/libproj.so: undefined reference to `SSL_shutdown'
./.libs/libproj.so: undefined reference to `ASN1_TIME_print'
./.libs/libproj.so: undefined reference to `SSL_version'
./.libs/libproj.so: undefined reference to `DES_ecb_encrypt'
./.libs/libproj.so: undefined reference to `SSL_get_shutdown'
./.libs/libproj.so: undefined reference to `ENGINE_set_default'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_next_proto_select_cb'
./.libs/libproj.so: undefined reference to `X509_STORE_add_lookup'
./.libs/libproj.so: undefined reference to `X509_get_issuer_name'
./.libs/libproj.so: undefined reference to `RSA_flags'
./.libs/libproj.so: undefined reference to `DSA_get0_pqg'
./.libs/libproj.so: undefined reference to `X509_EXTENSION_get_object'
./.libs/libproj.so: undefined reference to `RAND_status'
./.libs/libproj.so: undefined reference to `EVP_PKEY_copy_parameters'
./.libs/libproj.so: undefined reference to `EVP_MD_CTX_new'
./.libs/libproj.so: undefined reference to `X509_EXTENSION_get_data'
./.libs/libproj.so: undefined reference to `SSL_CTX_set_default_verify_paths'
./.libs/libproj.so: undefined reference to `EVP_DigestFinal_ex'
./.libs/libproj.so: undefined reference to `ENGINE_free'
./.libs/libproj.so: undefined reference to `MD4_Final'
./.libs/libproj.so: undefined reference to `SSL_get0_alpn_selected'
./.libs/libproj.so: undefined reference to `DH_get0_pqg'
./.libs/libproj.so: undefined reference to `EVP_md5'
./.libs/libproj.so: undefined reference to `d2i_X509_bio'
./.libs/libproj.so: undefined reference to `SSL_CTX_ctrl'
./.libs/libproj.so: undefined reference to `BN_print'
./.libs/libproj.so: undefined reference to `UI_method_set_reader'
./.libs/libproj.so: undefined reference to `PEM_read_bio_X509_AUX'
./.libs/libproj.so: undefined reference to `MD4_Init'
./.libs/libproj.so: undefined reference to `ASN1_STRING_get0_data'
./.libs/libproj.so: undefined reference to `ENGINE_ctrl'
./.libs/libproj.so: undefined reference to `EVP_sha1'
./.libs/libproj.so: undefined reference to `X509_NAME_ENTRY_get_data'
./.libs/libproj.so: undefined reference to `SSL_get_error'
./.libs/libproj.so: undefined reference to `PEM_write_bio_X509'
./.libs/libproj.so: undefined reference to `ENGINE_by_id'
./.libs/libproj.so: undefined reference to `SSL_CTX_free'
./.libs/libproj.so: undefined reference to `X509_PUBKEY_get0_param'
./.libs/libproj.so: undefined reference to `ENGINE_init'
./.libs/libproj.so: undefined reference to `EVP_DigestUpdate'
./.libs/libproj.so: undefined reference to `d2i_PrivateKey_bio'
./.libs/libproj.so: undefined reference to `PKCS12_parse'
./.libs/libproj.so: undefined reference to `d2i_PKCS12_bio'
./.libs/libproj.so: undefined reference to `ASN1_STRING_print'
./.libs/libproj.so: undefined reference to `SSL_get_peer_cert_chain'
./.libs/libproj.so: undefined reference to `UI_set_result'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1394: proj] Error 1
make[4]: Leaving directory '/opt/gdal.netcore/build-unix/proj-source/src'
make[3]: *** [Makefile:884: all] Error 2
make[3]: Leaving directory '/opt/gdal.netcore/build-unix/proj-source/src'
make[2]: *** [Makefile:450: all-recursive] Error 1
make[2]: Leaving directory '/opt/gdal.netcore/build-unix/proj-source'
make[1]: *** [gdal-makefile:172: build_proj] Error 2
make[1]: Leaving directory '/opt/gdal.netcore/unix'
make: *** [gdal-makefile:42: proj] Error 2
This seems that it has something to do with SSL? I've installed the openssl-devel library which is version OpenSSL 1.0.2k-fips 26 Jan 2017
Yes and no, for ssl. PROJ uses curl library with internal ssl from vcpkg. It can be some issue with cached link symbols. Please, try to rebuild PROJ with cleanup.
make -f gdal-makefile reset_proj configure_proj build_proj
Yes and no, for
ssl. PROJ usescurllibrary with internalsslfromvcpkg. It can be some issue with cached link symbols. Please, try to rebuild PROJ with cleanup.make -f gdal-makefile reset_proj configure_proj build_proj
I've tried your solution but I got the same error unfortunately.
You can check that symbol (OPENSSL_sk_num) is not available in older one. So it seems like there is some collision between package versions.
Probably, PROJ uses your OpenSSL 1.0.2k-fips 26 Jan 2017, but the latest from vcpkg is 1.1.1k.
Can you update or delete your ssl (from user)?
You can check that symbol (
OPENSSL_sk_num) is not available in older one. So it seems like there is some collision between package versions. Probably, PROJ uses yourOpenSSL 1.0.2k-fips 26 Jan 2017, but the latest fromvcpkgis1.1.1k. Can you update or delete your ssl (from user)?
I've updatet OpenSSL to version 1.1.1k but I still receive the same error. Even after rebuilding the vcpkg packages. Maybe next week I will try to compile from a fresh CentOS 7 system without NetCDF and see if that works first.
I've installed a fresh CentOS 7 WSL system, updated it and installed everything according to the Unix Readme. Everything compiles succesfully and I can generate the bindings and create the packages.
After that, I've added netcdf-c to the VCPKG_REQUIRE line in the shared/GdalCore.opt file (VCPKG_REQUIRE=tiff expat xerces-c libpng libiconv zlib netcdf-c) and ran make -f vcpkg-makefile all. This installed NetCDF successfully:
Starting package 5/5: netcdf-c:x64-linux
Building package netcdf-c[core]:x64-linux...
-- [OVERLAY] Loading triplet configuration from: /root/gdal.netcore/build-unix/vcpkg/custom-triplets/x64-linux.cmake
-- Downloading https://github.com/Unidata/netcdf-c/archive/26fba54a58fa02af92d84441ed90b417c1d08161.tar.gz -> Unidata-netcdf-c-26fba54a58fa02af92d84441ed90b417c1d08161.tar.gz...
-- Extracting source /root/gdal.netcore/build-unix/vcpkg/downloads/Unidata-netcdf-c-26fba54a58fa02af92d84441ed90b417c1d08161.tar.gz
-- Applying patch no-install-deps.patch
-- Applying patch config-pkg-location.patch
-- Applying patch use_targets.patch
-- Applying patch fix-dependency-libmath.patch
-- Applying patch fix-linkage-error.patch
-- Using source at /root/gdal.netcore/build-unix/vcpkg/buildtrees/netcdf-c/src/17c1d08161-2a03551a83.clean
-- Configuring x64-linux-rel
-- Building x64-linux-rel
-- Installing: /root/gdal.netcore/build-unix/vcpkg/packages/netcdf-c_x64-linux/share/netcdf-c/usage
-- Installing: /root/gdal.netcore/build-unix/vcpkg/packages/netcdf-c_x64-linux/share/netcdf-c/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /root/.cache/vcpkg/archives/7a/7a29befe092ac64170f1c4b49f6c9682e1620241.zip
Building package netcdf-c[core]:x64-linux... done
Installing package netcdf-c[core]:x64-linux...
Installing package netcdf-c[core]:x64-linux... done
Elapsed time for package netcdf-c:x64-linux: 19.63 s
However, when I ran make -f gdal-makefile force I still get the same errors as mentioned above.
./.libs/libproj.so: undefined reference to
Those errors are referred to PROJ library, there's nothing about NetCDF. What are the latest logs? Are they identical to above errors?
Please, If you post large logs here, use a spoiler or attach a file.
That's what it makes weird right? When removing netcdf-c from the line VCPKG_REQUIRE=tiff expat xerces-c libpng libiconv zlib line in the shared/GdalCore.opt file everything builds without any errors. But when I add netcdf-c, running make -f vcpkg-makefile succesfully builds and installs the libraries (vcpkg-makefile-netcdf.log), but when running make -f gdal-makefile I get the same ./.libs/libproj.so: undefined reference errors (gdal-makefile-netcdf.log).
Closing this as netCDF driver is available in the latest release 3.6.0.