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
Undefined symbols for architecture x86_64 iPhone Simulator #779
Comments
Yeah, I seem to recall hitting that in the past. I thought we cleared it about 2 or 3 years ago by making both aligned and non-aligned available all the time. I can't find the issue/discussion at the moment. I found CryptoPP 5.6.2 - Undefined symbols for architecture x86_64 on the mailing list but I think there's a better discussion somewhere. I see another report was opened about a year ago and it was closed due to lack of feedback. I [still?] think the best way forward is to make both routines available all of the time to sidestep the problem. Let me see if I can get the change added without breaking things. |
I think the changes on my testing fork are OK. I'm going to merge them.
And then:
|
I'm fairly certain we cleared the issue at PR #780. Ping back if you still have trouble. I can re-open the issue. |
Drop most of the SIMD logic. The cryptopp Makefile autodetects CPU features regardless if CPUTYPE is set and it is not possible to disable specific instruction sets. It is only possible to completely disable assembly optimizations, which is recommended for package building unless all consumer machines support the build machine's CPU instruction sets. Since version 8.1, it is no longer necessary to export -DCRYPTOPP_DISABLE_ASM to the pkgconfig file. Consumers will now build without it defined if the SIMD option is disabled. Remove old workarounds pertaining to this issue. weidai11/cryptopp#779 Bump PORTREVISION on consumers due to ABI incompatibility. https://www.cryptopp.com/release870.html
Drop most of the SIMD logic. The cryptopp Makefile autodetects CPU features regardless if CPUTYPE is set and it is not possible to disable specific instruction sets. It is only possible to completely disable assembly optimizations, which is recommended for package building unless all consumer machines support the build machine's CPU instruction sets. Since version 8.1, it is no longer necessary to export -DCRYPTOPP_DISABLE_ASM to the pkgconfig file. Consumers will now build without it defined if the SIMD option is disabled. Remove old workarounds pertaining to this issue. weidai11/cryptopp#779 Bump PORTREVISION on consumers due to ABI incompatibility. https://www.cryptopp.com/release870.html
We have a linker problem in the iPhone simulator with
master
. It works for devices but not for simulator. The problem is that for the simulator the flag-DCRYPTOPP_DISABLE_ASM
is added to the compilation and then the flagCRYPTOPP_BOOL_ALIGN16
is set to 0 in theconfig.h
, soCryptoPP::AlignedAllocate
andCryptoPP::AlignedDeallocate
aren't compiled:In our headers search path, the cryptopp
config.h
has the line https://github.com/weidai11/cryptopp/blob/master/config.h#L64 commented and I think for that the linker fails. This line should be commented for devices (armv7, armv7s and arm64) but not for simulator (x84_64).The problem is that we have a fat library (for iPhone and iPhone simulator), the arch x86_64 built with
-DCRYPTOPP_DISABLE_ASM
and the others one without-DCRYPTOPP_DISABLE_ASM
and then we have the sameconfig.h
(one library with all archs and one common include folder). We compile thecryptopp
using thesetenv-ios.sh
scrript and themake -f GNUmakefile-cross lean -j 8
.We can fix the issue, compiling all the archs with
-DCRYPTOPP_DISABLE_ASM
and uncommented the line in theconfig.h
, but we wouldn't take the adventage of useASM
where available.Any advice to fix this issues?
The text was updated successfully, but these errors were encountered: