Building for iOS is not working

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Building for iOS is not working

Yahel Bouaziz
Hi Guys,

I'm following to the letter the guide at : https://www.cryptopp.com/wiki/IOS_(Command_Line)
But with Xcode 8.2.3

I set the env using : 

. ./setenv-ios.sh 

Configuring for iPhoneOS (armv7)

XCODE_SDK: iPhoneOS10.3.sdk

XCODE_DEVELOPER: /Applications/Xcode.app/Contents/Developer

XCODE_TOOLCHAIN: /Applications/Xcode.app/Contents/Developer/usr/bin

XCODE_DEVELOPER_TOP: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer

IOS_ARCH: armv7

IOS_TOOLCHAIN: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/

IOS_FLAGS: 

IOS_SYSROOT: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk




Then :

 make -f GNUmakefile-cross


which works for a few files but dies on the crc.cpp file. I tried forcing the -DCRYPTOPP_DISABLE_ASM flag, but to no avail, error is exactly the same.

clang++ -DNDEBUG -g2 -O3 -fPIC -pipe -DCRYPTOPP_DISABLE_ASM -miphoneos-version-min=6 -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -stdlib=libc++ -c crc.cpp

 

crc
.cpp:21:7: error: invalid instruction

       
asm ("crc32 %1, %0" : "+r"(crc) : "r"(val));

             
^

<inline asm>:1:2: note: instantiated into assembly here

        crc32 r1
, r0

       
^~~~~

crc
.cpp:27:7: error: invalid instruction

       
asm ("crc32 %1, %0" : "+r"(crc) : "r"(val));

             
^

<inline asm>:1:2: note: instantiated into assembly here

        crc32 r1
, r0

       
^~~~~

crc
.cpp:33:7: error: invalid instruction

       
asm ("crc32 %1, %0" : "+r"(crc) : "r"(val));

             
^

<inline asm>:1:2: note: instantiated into assembly here

        crc32 r1
, r0

       
^~~~~

3 errors generated.

make
: *** [crc.o] Error 1


Any idea appreciated.


Thanks.


Yahel

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building for iOS is not working

Jeffrey Walton-3

I'm following to the letter the guide at : <a href="https://www.cryptopp.com/wiki/IOS_(Command_Line)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;">https://www.cryptopp.com/wiki/IOS_(Command_Line)
But with Xcode 8.2.3 ...

Thanks Yahel.

I was kind of worried about that break. The problem is Apple dumbs down their version of Clang, while LLVM's Clang is fully featured. I'm guessing a `make -k` will show problems around PMULL, AES and SHA, too (gcm.cpp, rijndael.cpp and sha.cpp).

The other problem is, both my MacBooks are down so its not being well tested. The first machine's hard drive went bad, so its a new machine without tools. The second had the battery go bad, and leak took out the machine.

I might be able to have a fix shortly, but I'm worried about testing.

Can you provide remote SSH access to the machine? I can provide an authorized_keys file.

Jeff

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building for iOS is not working

Jeffrey Walton-3


On Tuesday, June 6, 2017 at 8:06:20 AM UTC-4, Jeffrey Walton wrote:

I'm following to the letter the guide at : <a href="https://www.cryptopp.com/wiki/IOS_(Command_Line)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;">https://www.cryptopp.com/wiki/IOS_(Command_Line)
But with Xcode 8.2.3 ...

Thanks Yahel.

I was kind of worried about that break. The problem is Apple dumbs down their version of Clang, while LLVM's Clang is fully featured. I'm guessing a `make -k` will show problems around PMULL, AES and SHA, too (gcm.cpp, rijndael.cpp and sha.cpp).

The other problem is, both my MacBooks are down so its not being well tested. The first machine's hard drive went bad, so its a new machine without tools. The second had the battery go bad, and leak took out the machine.

I might be able to have a fix shortly, but I'm worried about testing.

This change is being tested now: https://github.com/noloader/cryptopp/commit/a279b00bd0fc. The problem is, it only test on Intel hardware. I manually run test on ARM, but they passed prior to your report :(

If it test OK, then I'll push it to Wei's repo.

Jeff

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building for iOS is not working

Yahel Bouaziz
In reply to this post by Jeffrey Walton-3
Can you provide remote SSH access to the machine? I can provide an authorized_keys file.
 
Thanks for the quick response.
Unfortunately I can not provide outside access to my machine.

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building for iOS is not working

Yahel Bouaziz
In reply to this post by Jeffrey Walton-3
I pulled from your repo with the new commit you indicated.

It builds correctly. 
I can't run the tests though as I don't have a jailbroken device.

Thanks for your quick actions.

When you have the tests passed, could you please tell me so that I'm reassured everything will work correctly ?

Anything I should know about your fork compared to the original repo ?

Thanks.


Le mardi 6 juin 2017 14:40:52 UTC+2, Jeffrey Walton a écrit :


On Tuesday, June 6, 2017 at 8:06:20 AM UTC-4, Jeffrey Walton wrote:

I'm following to the letter the guide at : <a href="https://www.cryptopp.com/wiki/IOS_(Command_Line)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;">https://www.cryptopp.com/wiki/IOS_(Command_Line)
But with Xcode 8.2.3 ...

Thanks Yahel.

I was kind of worried about that break. The problem is Apple dumbs down their version of Clang, while LLVM's Clang is fully featured. I'm guessing a `make -k` will show problems around PMULL, AES and SHA, too (gcm.cpp, rijndael.cpp and sha.cpp).

The other problem is, both my MacBooks are down so its not being well tested. The first machine's hard drive went bad, so its a new machine without tools. The second had the battery go bad, and leak took out the machine.

I might be able to have a fix shortly, but I'm worried about testing.

This change is being tested now: <a href="https://github.com/noloader/cryptopp/commit/a279b00bd0fc" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fnoloader%2Fcryptopp%2Fcommit%2Fa279b00bd0fc\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFepIGcPwuH0-pHJ8lOGGh4zUrhGw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fnoloader%2Fcryptopp%2Fcommit%2Fa279b00bd0fc\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFepIGcPwuH0-pHJ8lOGGh4zUrhGw&#39;;return true;">https://github.com/noloader/cryptopp/commit/a279b00bd0fc. The problem is, it only test on Intel hardware. I manually run test on ARM, but they passed prior to your report :(

If it test OK, then I'll push it to Wei's repo.

Jeff

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building for iOS is not working

Jeffrey Walton-3
In reply to this post by Jeffrey Walton-3


On Tuesday, June 6, 2017 at 8:40:52 AM UTC-4, Jeffrey Walton wrote:

On Tuesday, June 6, 2017 at 8:06:20 AM UTC-4, Jeffrey Walton wrote:

I'm following to the letter the guide at : <a href="https://www.cryptopp.com/wiki/IOS_(Command_Line)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;">https://www.cryptopp.com/wiki/IOS_(Command_Line)
But with Xcode 8.2.3 ...

Thanks Yahel.

I was kind of worried about that break. The problem is Apple dumbs down their version of Clang, while LLVM's Clang is fully featured. I'm guessing a `make -k` will show problems around PMULL, AES and SHA, too (gcm.cpp, rijndael.cpp and sha.cpp).

The other problem is, both my MacBooks are down so its not being well tested. The first machine's hard drive went bad, so its a new machine without tools. The second had the battery go bad, and leak took out the machine.

I might be able to have a fix shortly, but I'm worried about testing.

This change is being tested now: <a href="https://github.com/noloader/cryptopp/commit/a279b00bd0fc" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fnoloader%2Fcryptopp%2Fcommit%2Fa279b00bd0fc\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFepIGcPwuH0-pHJ8lOGGh4zUrhGw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fnoloader%2Fcryptopp%2Fcommit%2Fa279b00bd0fc\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFepIGcPwuH0-pHJ8lOGGh4zUrhGw&#39;;return true;">https://github.com/noloader/cryptopp/commit/a279b00bd0fc. The problem is, it only test on Intel hardware. I manually run test on ARM, but they passed prior to your report :(

If it test OK, then I'll push it to Wei's repo.

Thanks again Yahel.

It was pushed to Wei's repo at https://github.com/weidai11/cryptopp/commit/1565020bfd7f.

Jeff

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Building for iOS is not working

Yahel Bouaziz
Thanks to you !!

Have a great day.

Yahel

Le mardi 6 juin 2017 15:44:45 UTC+2, Jeffrey Walton a écrit :


On Tuesday, June 6, 2017 at 8:40:52 AM UTC-4, Jeffrey Walton wrote:

On Tuesday, June 6, 2017 at 8:06:20 AM UTC-4, Jeffrey Walton wrote:

I'm following to the letter the guide at : <a href="https://www.cryptopp.com/wiki/IOS_(Command_Line)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cryptopp.com%2Fwiki%2FIOS_(Command_Line)\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEVeT1sRxN54p3V5pDYpcfBJP5lqg&#39;;return true;">https://www.cryptopp.com/wiki/IOS_(Command_Line)
But with Xcode 8.2.3 ...

Thanks Yahel.

I was kind of worried about that break. The problem is Apple dumbs down their version of Clang, while LLVM's Clang is fully featured. I'm guessing a `make -k` will show problems around PMULL, AES and SHA, too (gcm.cpp, rijndael.cpp and sha.cpp).

The other problem is, both my MacBooks are down so its not being well tested. The first machine's hard drive went bad, so its a new machine without tools. The second had the battery go bad, and leak took out the machine.

I might be able to have a fix shortly, but I'm worried about testing.

This change is being tested now: <a href="https://github.com/noloader/cryptopp/commit/a279b00bd0fc" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fnoloader%2Fcryptopp%2Fcommit%2Fa279b00bd0fc\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFepIGcPwuH0-pHJ8lOGGh4zUrhGw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fnoloader%2Fcryptopp%2Fcommit%2Fa279b00bd0fc\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFepIGcPwuH0-pHJ8lOGGh4zUrhGw&#39;;return true;">https://github.com/noloader/cryptopp/commit/a279b00bd0fc. The problem is, it only test on Intel hardware. I manually run test on ARM, but they passed prior to your report :(

If it test OK, then I'll push it to Wei's repo.

Thanks again Yahel.

It was pushed to Wei's repo at <a href="https://github.com/weidai11/cryptopp/commit/1565020bfd7f" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fweidai11%2Fcryptopp%2Fcommit%2F1565020bfd7f\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHMlhJucDygMmni0pkDXapTCjR-ig&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fweidai11%2Fcryptopp%2Fcommit%2F1565020bfd7f\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHMlhJucDygMmni0pkDXapTCjR-ig&#39;;return true;">https://github.com/weidai11/cryptopp/commit/1565020bfd7f.

Jeff

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...