I'm trying to (cross-)compile obfuscated-openssh for the iPhone, and I'm running into some problems. I'm using this to configure the build:
./configure --host=arm-apple-darwin CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 \
CFLAGS="-arch armv6 -pipe -std=c99 -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include \
-L/Users/ben/iphonelib -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type \
-Wunused-variable -fmessage-length=0 -fvisibility=hidden \
-miphoneos-version-min=2.0 -gdwarf-2 -mthumb \
-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk" \
CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp \
AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
This doesn't work, though, complaining about not being able to find many header files, including netinet/in_systm.h
and openssl/bn.h
. Does anyone have any ideas as to how to make the build finish?
in_systm.h
isn't available on iPhone. It only defines a few types, and the other pieces it includes are available. So you may be able to just copy the Mac version of the header into the build tree and point to it. ("locate in_systm.h" is a good way to find these kinds of things.)
You may very well run into many more problems like this, but that's how to address in_systm.h
.
Openssh depends on the openssl libraries. You'll probably need to build that first.
I recently had to add ssh support to an embedded system and used Dropbear. It was a lot easier to get up and running than openssh. It gave us scp, ssh, and sshd support with a 300k executable. Supposedly, for ssh only you can get it down to ~110K.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With