Skip to content

Compilation Error on 32bit #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ashavit opened this issue Oct 19, 2014 · 9 comments
Closed

Compilation Error on 32bit #7

ashavit opened this issue Oct 19, 2014 · 9 comments

Comments

@ashavit
Copy link

ashavit commented Oct 19, 2014

Hi,
The 1.0.1.j version doesn't compile on 32 bit. It Throws the following:
Undefined symbols for architecture i386:
"_fopen$UNIX2003", referenced from:
_BIO_new_file in libcrypto.a(bss_file.o)
_file_ctrl in libcrypto.a(bss_file.o)
_open_console in libcrypto.a(ui_openssl.o)
"_fputs$UNIX2003", referenced from:
_write_string in libcrypto.a(ui_openssl.o)
_read_string in libcrypto.a(ui_openssl.o)
"_fwrite$UNIX2003", referenced from:
_file_write in libcrypto.a(bss_file.o)
_file_puts in libcrypto.a(bss_file.o)
_int_rsa_verify in libcrypto.a(rsa_sign.o)
_send_fp_chars in libcrypto.a(a_strex.o)
_write_fp in libcrypto.a(b_dump.o)
_read_string in libcrypto.a(ui_openssl.o)
_read_string_inner in libcrypto.a(ui_openssl.o)
...
"_strerror$UNIX2003", referenced from:
_ERR_load_ERR_strings in libcrypto.a(err.o)
ld: symbol(s) not found for architecture i386

On 64 bit simulators it works fine.
Thank you.

@krzyzanowskim
Copy link
Owner

hm.... current build have i386 binary already, should be fine. Can you prepare example project for that ?

$ file libssl.a
libssl.a: Mach-O universal binary with 5 architectures
libssl.a (for architecture armv7): current ar archive random library
libssl.a (for architecture armv7s): current ar archive random library
libssl.a (for architecture i386): current ar archive random library
libssl.a (for architecture x86_64): current ar archive random library
libssl.a (for architecture arm64): current ar archive random library

$ file libcrypto.a
libcrypto.a: Mach-O universal binary with 5 architectures
libcrypto.a (for architecture armv7): current ar archive random library
libcrypto.a (for architecture armv7s): current ar archive random library
libcrypto.a (for architecture i386): current ar archive random library
libcrypto.a (for architecture x86_64): current ar archive random library
libcrypto.a (for architecture arm64): current ar archive random library

@nesterenkodm
Copy link

got lots of the same errors.

Undefined symbols for architecture i386:
  "_closedir$UNIX2003", referenced from:
      _OPENSSL_DIR_end in libcrypto.a(o_dir.o)
  "_fopen$UNIX2003", referenced from:
      _BIO_new_file in libcrypto.a(bss_file.o)
      _file_ctrl in libcrypto.a(bss_file.o)
      _open_console in libcrypto.a(ui_openssl.o)
  "_fputs$UNIX2003", referenced from:
      _write_string in libcrypto.a(ui_openssl.o)
      _read_string in libcrypto.a(ui_openssl.o)
  "_fwrite$UNIX2003", referenced from:
      _send_fp_chars in libcrypto.a(a_strex.o)
      _file_write in libcrypto.a(bss_file.o)
      _file_puts in libcrypto.a(bss_file.o)
      _int_rsa_verify in libcrypto.a(rsa_sign.o)
      _dtls1_retransmit_buffered_messages in libssl.a(d1_both.o)
      _write_fp in libcrypto.a(b_dump.o)
      _TXT_DB_read in libcrypto.a(txt_db.o)
      ...
  "_opendir$INODE64$UNIX2003", referenced from:
      _OPENSSL_DIR_read in libcrypto.a(o_dir.o)
  "_readdir$INODE64", referenced from:
      _OPENSSL_DIR_read in libcrypto.a(o_dir.o)
  "_strerror$UNIX2003", referenced from:
      _ERR_load_ERR_strings in libcrypto.a(err.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@nesterenkodm
Copy link

lipo output

➜  lib-ios git:(master) ✗ lipo -info libssl.a 
Architectures in the fat file: libssl.a are: armv7 armv7s i386 x86_64 arm64 
➜  lib-ios git:(master) ✗ lipo -info libcrypto.a 
Architectures in the fat file: libcrypto.a are: armv7 armv7s i386 x86_64 arm64 

@nesterenkodm
Copy link

Also for 64 bit simulator:

Undefined symbols for architecture x86_64:
  "_opendir$INODE64", referenced from:
      _OPENSSL_DIR_read in libcrypto.a(o_dir.o)
  "_readdir$INODE64", referenced from:
      _OPENSSL_DIR_read in libcrypto.a(o_dir.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@krzyzanowskim
Copy link
Owner

May it be CocoaPods related issue ? CocoaPods/CocoaPods#2666

@krzyzanowskim
Copy link
Owner

Fixed with 1.0.1.j-2. Please update.

@ashavit
Copy link
Author

ashavit commented Oct 23, 2014

Look like it fixed the compilation errors.
Thnx

@nesterenkodm
Copy link

Can't update to the 1.0.1.j-2 version since it have not yet appeared in the pod specs repository

➜  pod search openssl-universal


-> OpenSSL-Universal (1.0.1.j)
   OpenSSL for iOS and OS X
   pod 'OpenSSL-Universal', '~> 1.0.1.j'
   - Homepage: http://krzyzanowskim.github.io/OpenSSL/
   - Source:   https://github.com/krzyzanowskim/OpenSSL.git
   - Versions: 1.0.1.j, 1.0.1.i, 1.0.1.h, 1.0.1.g, 1.0.1.f [master repo]

@krzyzanowskim
Copy link
Owner

$ pod search openssl-universal
Can't confirm. Is it possible that you have something outdated ?

http://cocoapods.org/?q=openssl-universal

-> OpenSSL-Universal (1.0.1.j-2)
OpenSSL for iOS and OS X
pod 'OpenSSL-Universal', '~> 1.0.1.j-2'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants