Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Notes on build-mosh, instructions format and issues #4

Open
RalphSutherland opened this issue Sep 12, 2016 · 0 comments
Open

Notes on build-mosh, instructions format and issues #4

RalphSutherland opened this issue Sep 12, 2016 · 0 comments

Comments

@RalphSutherland
Copy link

build-mosh notes:

Instructions edit:

Building

  • Checkout submodules

    > git submodule init
    > git submodule update
    
  • Compile
    Enable / Disable architectures from the build-mosh.sh file by commenting / uncommenting the "buildit" lines. Current supported architectures are arm64 and x86_64 due to threading code support.

  • To compile, just run:

    > ./build-mosh.sh
    

Output library files will be generated on the output folder. Lipo .a files grouping all the architectures will be created at the root of output/, while you can also access each architecture on the corresponding folder. For installation in Blink, please copy only the Lipo files.

Issues

If you comment out the i386 option in

build-mosh.sh :

buildit arm64 iPhoneOS
#buildit i386 iPhoneSimulator
buildit x86_64 iPhoneSimulator

then the lipos are not built in output/ with the x86_64 and arm64 libs.

either leave i386 in above and let linkers take care of ignoring the i386,

or

edit the lipo link commands.

LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshcrypto.a $pwd/output/i386/libmoshcrypto.a $pwd/output/arm64/libmoshcrypto.a  -output $pwd/output/libmoshcrypto.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshnetwork.a $pwd/output/i386/libmoshnetwork.a $pwd/output/arm64/libmoshnetwork.a -output $pwd/output/libmoshnetwork.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshprotos.a $pwd/output/i386/libmoshprotos.a $pwd/output/arm64/libmoshprotos.a -output $pwd/output/libmoshprotos.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshios.a $pwd/output/i386/libmoshios.a $pwd/output/arm64/libmoshios.a -output $pwd/output/libmoshios.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshstatesync.a $pwd/output/i386/libmoshstatesync.a $pwd/output/arm64/libmoshstatesync.a -output $pwd/output/libmoshstatesync.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshterminal.a $pwd/output/i386/libmoshterminal.a $pwd/output/arm64/libmoshterminal.a -output $pwd/output/libmoshterminal.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshutil.a $pwd/output/i386/libmoshutil.a $pwd/output/arm64/libmoshutil.a -output $pwd/output/libmoshutil.a

to

LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshcrypto.a =$pwd/output/arm64/libmoshcrypto.a  -output $pwd/output/libmoshcrypto.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshnetwork.a $pwd/output/arm64/libmoshnetwork.a -output $pwd/output/libmoshnetwork.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshprotos.a $pwd/output/arm64/libmoshprotos.a -output $pwd/output/libmoshprotos.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshios.a $pwd/output/arm64/libmoshios.a -output $pwd/output/libmoshios.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshstatesync.a $pwd/output/arm64/libmoshstatesync.a -output $pwd/output/libmoshstatesync.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshterminal.a $pwd/output/arm64/libmoshterminal.a -output $pwd/output/libmoshterminal.a
LIPO=$(xcrun -sdk iphoneos -find lipo)
$LIPO -create $pwd/output/x86_64/libmoshutil.a $pwd/output/arm64/libmoshutil.a -output $pwd/output/libmoshutil.a
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant