greyltc / android_external_sshfs

Fuse based ssh file system client for android devices
GNU General Public License v2.0
70 stars 12 forks source link

Unable to build sshfs #2

Closed lotan closed 10 years ago

lotan commented 10 years ago

Hi John,

first of all: Thanks for porting sshfs to Android.

I'm not very experienced in building Android/CM so this entire issue could easily be my fault but maybe you have a clue for me how I could make it happen after all...

I prepared

~/android/system

as described in the README. I did have some issues during the build concerning mpdecision, thermald and camera.default.so. But when I excluded those from the make I succeeded in building the image.

Afterwards, I cloned your repositories, however I used the cm-10.2 branches as my CM tree is 10.2:

$ git clone -b cm-10.2 https://github.com/l3iggs/android_external_glib.git ~/android/system/external/sshfs
$ git clone -b cm-10.2 https://github.com/l3iggs/android_external_glib.git ~/android/system/external/glib

after

cd ~/android/system/external/sshfs
adb root
adb remount
mmp -B

the build fails pretty quickly, complaining:

PRODUCT_COPY_FILES device/htc/pyramid/keylayout/AVRCP.kl:system/usr/keylayout/AVRCP.kl ignored.
No private recovery resources for TARGET_DEVICE pyramid
make: *** No rule to make target '/home/user1/android/system/out/target/product/pyramid/obj/SHARED_LIBRARIES/libglib-2.0_intermediates/export_includes', needed by '/home/user1/android/system/out/target/product/pyramid/obj/EXECUTABLES/sshfs_intermediates/import_includes'.  Stop.
make: Leaving directory '/home/user1/android/system'

I then attempted to build the glib first but failed doing so: First, it complained about missing LOCAL_MODULE_TAGS. Once I had added those into each of the .mk files, I received the following error message:

external/glib/glib/gbitlock.c: In function 'g_futex_wait':
external/glib/glib/gbitlock.c:84:12: error: 'SYS_futex' undeclared (first use in this function)
external/glib/glib/gbitlock.c:84:12: note: each undeclared identifier is reported only once for each function it appears in
external/glib/glib/gbitlock.c: In function 'g_futex_wake':
external/glib/glib/gbitlock.c:101:12: error: 'SYS_futex' undeclared (first use in this function)

which I couldn't resolve.

I would be grateful for any pointers.

Guimli commented 10 years ago

Hello The SYS_futex error can be passed by add this to the line 32 of file external/glib/glib/gbitlock.c :

define G_BIT_LOCK_FORCE_FUTEX_EMULATION

For the dlopen and dlclose error, add this to the line 28 of file external/sshfs/Android.mk in the LOCAL_SHARED_LIBRARIES section : libdl

l3iggs commented 10 years ago

thanks for reporting these. I've made your 2nd change.