BUG #18980: Unable to perform make due to inability to resolve a variety of Undefined symbols arm64

Started by PG Bug reporting form9 months ago2 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 18980
Logged by: Clifford Campo
Email address: cc@cj3.cc
PostgreSQL version: 18beta1
Operating system: Mac OS Tahoe on M4 Pro Mac Book Pro
Description:

Although I was able to compile and link 18beta1 source code on a very old
mid-2010 iMac running MacOSX 10.13.6 [High Sierra], I could NOT compile and
link PostgreSQL version 18beta1 source on my new M4 Pro Mac Book Pro running
Mac OS Tahoe; *** also failed to compile and link on this same machine
running Mac OS 15.5***
configure looked like:
./configure \
--prefix=/usr/local/pgsql/pgsql18beta1 \
--exec-prefix=/usr/local/pgsql/pgsql18beta1-exec \
--with-perl \
--with-python \
--with-pgport=5438 \
--with-bonjour \
--enable-debug \
--without-icu \
--with-tcl \
--with-tclconfig=/opt/homebrew/Cellar/tcl-tk/9.0.1/lib
NOTE: I was able to configure, make and INSTALL PostgreSQL 17.5 ON THIS Same
exact same Mac OS Tahoe on M4 Pro Mac Book Pro !!
Numerous "Undefined symbols for architecture arm64" errors when attempting
to perform the make step per
/.../.../.../18/18beta1/postgresql-18beta1/tmp_install/log/install.log:
Errors resulting from attempting to perform a make on PostgreSQL version
18beta1 look like:
177 Undefined symbols for architecture arm64:
178 "_ASN1_INTEGER_to_BN", referenced from:
179 _verify_cb in be-secure-openssl.o
180 _be_tls_get_peer_serial in be-secure-openssl.o
181 "_ASN1_STRING_print_ex", referenced from:
182 _X509_NAME_to_cstring in be-secure-openssl.o
183 "_BIO_clear_flags", referenced from:
184 _port_bio_write in be-secure-openssl.o
185 _port_bio_read in be-secure-openssl.o
186 "_BIO_ctrl", referenced from:
187 _be_tls_open_server in be-secure-openssl.o
188 _X509_NAME_to_cstring in be-secure-openssl.o
189 _X509_NAME_to_cstring in be-secure-openssl.o
190 "_BIO_free", referenced from:
191 _initialize_dh in be-secure-openssl.o
192 _initialize_dh in be-secure-openssl.o
193 _be_tls_open_server in be-secure-openssl.o
194 _be_tls_open_server in be-secure-openssl.o
195 _X509_NAME_to_cstring in be-secure-openssl.o
196 "_BIO_get_data", referenced from:
197 _port_bio_write in be-secure-openssl.o
198 _port_bio_read in be-secure-openssl.o
199 _port_bio_ctrl in be-secure-openssl.o
200 "_BIO_get_new_index", referenced from:
201 _be_tls_open_server in be-secure-openssl.o
202 "_BIO_meth_free", referenced from:
203 _be_tls_open_server in be-secure-openssl.o
204 "_BIO_meth_new", referenced from:
205 _be_tls_open_server in be-secure-openssl.o
206 "_BIO_meth_set_ctrl", referenced from:
207 _be_tls_open_server in be-secure-openssl.o
208 "_BIO_meth_set_read", referenced from:
209 _be_tls_open_server in be-secure-openssl.o
210 "_BIO_meth_set_write", referenced from:
211 _be_tls_open_server in be-secure-openssl.o
212 "_BIO_new", referenced from:
213 _be_tls_open_server in be-secure-openssl.o
214 _be_tls_open_server in be-secure-openssl.o
215 _X509_NAME_to_cstring in be-secure-openssl.o
216 "_BIO_new_mem_buf", referenced from:
217 _initialize_dh in be-secure-openssl.o
218 "_BIO_printf", referenced from:
219 _X509_NAME_to_cstring in be-secure-openssl.o
220 "_BIO_s_mem", referenced from:
221 _be_tls_open_server in be-secure-openssl.o
222 _X509_NAME_to_cstring in be-secure-openssl.o
223 "_BIO_set_data", referenced from:
224 _be_tls_open_server in be-secure-openssl.o
225 "_BIO_set_flags", referenced from:
226 _port_bio_write in be-secure-openssl.o
227 _port_bio_read in be-secure-openssl.o
228 "_BIO_set_init", referenced from:
229 _be_tls_open_server in be-secure-openssl.o
230 "_BIO_write", referenced from:
231 _X509_NAME_to_cstring in be-secure-openssl.o
232 "_BN_bn2dec", referenced from:
233 _verify_cb in be-secure-openssl.o
234 _be_tls_get_peer_serial in be-secure-openssl.o
235 "_BN_free", referenced from:
236 _verify_cb in be-secure-openssl.o
237 _be_tls_get_peer_serial in be-secure-openssl.o
238 "_CRYPTO_free", referenced from:
239 _verify_cb in be-secure-openssl.o
240 _be_tls_get_peer_serial in be-secure-openssl.o
241 "_DH_check", referenced from:
242 _initialize_dh in be-secure-openssl.o
243 "_DH_free", referenced from:
244 _initialize_dh in be-secure-openssl.o
245 _initialize_dh in be-secure-openssl.o
246 _initialize_dh in be-secure-openssl.o
247 "_ERR_clear_error", referenced from:
248 _be_tls_open_server in be-secure-openssl.o
249 _be_tls_open_server in be-secure-openssl.o
. Note: I've been building PostgreSQL from source since PostgreSQL version
9.4.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: BUG #18980: Unable to perform make due to inability to resolve a variety of Undefined symbols arm64

PG Bug reporting form <noreply@postgresql.org> writes:

Although I was able to compile and link 18beta1 source code on a very old
mid-2010 iMac running MacOSX 10.13.6 [High Sierra], I could NOT compile and
link PostgreSQL version 18beta1 source on my new M4 Pro Mac Book Pro running
Mac OS Tahoe; *** also failed to compile and link on this same machine
running Mac OS 15.5***

That does work for me, and for quite a few other people.

Errors resulting from attempting to perform a make on PostgreSQL version
18beta1 look like:
177 Undefined symbols for architecture arm64:
178 "_ASN1_INTEGER_to_BN", referenced from:
179 _verify_cb in be-secure-openssl.o
180 _be_tls_get_peer_serial in be-secure-openssl.o
181 "_ASN1_STRING_print_ex", referenced from:
182 _X509_NAME_to_cstring in be-secure-openssl.o

All of these missing symbols seem to be from OpenSSL, which I don't
understand because your configure command didn't say --with-openssl.
Are you sure that's actually the full set of options you're using?
Maybe you have a stale autoconf cache you need to clean out?

If you are using --with-openssl, I wonder which OpenSSL you are
using. Apple deprecated their system-library version of that
long ago, and perhaps it's finally gone in Tahoe. Most of us
use Homebrew or MacPorts to install a version of the openssl
libraries that we can use with PG. If you are trying to do it
like that, I think the problem is that you're missing --with-includes
and --with-libs configure options to point at that installation.
For instance, I use

--with-includes=/opt/local/include --with-libs=/opt/local/lib

to build with MacPorts' openssl.

regards, tom lane