Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

opusfile 0.1 #15656

Closed
wants to merge 2 commits into from
Closed

opusfile 0.1 #15656

wants to merge 2 commits into from

Conversation

rillian
Copy link
Contributor

@rillian rillian commented Oct 25, 2012

The opusfile library provides a high-level API for decoding
and seeking in .opus audio streams, including over http.

This formula depends on openssl for https support because of

ld: symbol(s) not found for architecture x86_64

with the Apple version of openssl on MacOS 10.7.5.

The system ssl library should work, and indeed it does if I
do a naive './configure && make' in the normal environment.
Something about the brew environment seems to confuse the linker.

The opusfile library provides a high-level API for decoding
and seeking in .opus audio streams, including over http.

This formula depends on openssl for https support because of

  ld: symbol(s) not found for architecture x86_64

with the Apple version of openssl on MacOS 10.7.5.

The system ssl library should work, and indeed it does if I
do a naive './configure && make' in the normal environment.
Something about the brew environment seems to confuse the linker.
@adamv
Copy link
Contributor

adamv commented Oct 25, 2012

Note, we have another open issue mentioning a Homebrew/openssl linker issue.

@rillian
Copy link
Contributor Author

rillian commented Oct 25, 2012

Can you be more specific? I looked through recent issues but didn't find anything which looked like the same problem.

Without "depends_on 'openssl'" I get:

$ gcc -dynamiclib -o .libs/libopusfile.0.dylib .libs/http.o .libs/info.o .libs/internal.o .libs/opusfile.o .libs/stream.o -L/usr/local/Cellar/libogg/1.3.0/lib -L/usr/local/Cellar/opus/HEAD/lib -logg -lopus -lssl -lcrypto -lz -O2 -install_name /usr/local/Cellar/opusfile/0.1/lib/libopusfile.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module
Undefined symbols for architecture x86_64:
"_SSL_CTX_free", referenced from:
_op_http_stream_clear in http.o
"_SSL_CTX_new", referenced from:
_op_url_stream_vcreate in http.o
"_SSL_CTX_set_verify", referenced from:
_op_url_stream_vcreate in http.o
"_SSL_SESSION_free", referenced from:
_op_http_stream_clear in http.o
_op_url_stream_vcreate in http.o
"_SSL_connect", referenced from:
_op_http_conn_establish_tunnel in http.o
_op_http_conn_start_tls in http.o
"_SSL_ctrl", referenced from:
_op_http_conn_start_tls in http.o
"_SSL_do_handshake", referenced from:
_op_http_conn_start_tls in http.o
"_SSL_free", referenced from:
_op_http_conn_close in http.o
_op_http_connect in http.o
"_SSL_get1_session", referenced from:
_op_http_conn_start_tls in http.o
"_SSL_get_error", referenced from:
_op_http_conn_write_fully in http.o
_op_http_conn_read in http.o
_op_http_conn_read_response in http.o
_op_http_conn_start_tls in http.o
"_SSL_library_init", referenced from:
_op_url_stream_vcreate in http.o
"_SSL_new", referenced from:
_op_http_connect in http.o
"_SSL_peek", referenced from:
_op_http_conn_read_response in http.o
"_SSL_pending", referenced from:
_op_http_conn_estimate_available in http.o
"_SSL_read", referenced from:
_op_http_conn_read in http.o
"_SSL_set_bio", referenced from:
_op_http_conn_establish_tunnel in http.o
_op_http_conn_start_tls in http.o
"_SSL_set_connect_state", referenced from:
_op_http_conn_establish_tunnel in http.o
_op_http_conn_start_tls in http.o
"_SSL_set_session", referenced from:
_op_http_conn_start_tls in http.o
"_SSL_shutdown", referenced from:
_op_http_conn_close in http.o
"_SSL_write", referenced from:
_op_http_conn_write_fully in http.o
"_SSLv23_client_method", referenced from:
_op_url_stream_vcreate in http.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

$ file /usr/lib/libssl.dylib
/usr/lib/libssl.dylib: Mach-O universal binary with 2 architectures
/usr/lib/libssl.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/usr/lib/libssl.dylib (for architecture i386): Mach-O dynamically linked shared library i386

$ nm -arch x86_64 /usr/lib/libssl.dylib | grep SSL_free
00000000000248c0 T _SSL_free

$ nm -arch i386 /usr/lib/libssl.dylib | grep SSL_free
00025ed0 T _SSL_free

So the system openssl looks like a universal library already.

@adamv
Copy link
Contributor

adamv commented Oct 26, 2012

This one: #15283

@2bits
Copy link
Contributor

2bits commented Oct 27, 2012

Does --env=std fix this?

@rillian
Copy link
Contributor Author

rillian commented Oct 28, 2012

Good idea, but no.

==> Downloading http://downloads.xiph.org/releases/opus/opusfile-0.1.tar.gz
Already downloaded: /Users/giles/Library/Caches/Homebrew/opusfile-0.1.tar.gz
==> ./configure --prefix=/usr/local/Cellar/opusfile/0.1
==> make install
  "_SSLv23_client_method", referenced from:
      _op_url_stream_vcreate in http.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: **\* [libopusfile.la] Error 1

Error: opusfile did not build```

I don't entirely follow what brew's 'cc' wrapper is doing. Could it be setting a sysroot where the (deprecated) system openssl isn't available?

New upstream release.
@adamv adamv closed this in c42aa28 Jan 5, 2013
@rillian
Copy link
Contributor Author

rillian commented Jan 11, 2013

My ssl linking error turned out to the conflict with nss, resolved in b971263 in #15283. Thanks for tracking that down!

dholm pushed a commit to dholm/homebrew that referenced this pull request Jan 14, 2013
Closes Homebrew#15656.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants