Skip to content
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

build problems (hardcoded path, non-existence target, closed spice protocol) #7

Open
everplays opened this issue Dec 25, 2016 · 12 comments

Comments

@everplays
Copy link

everplays commented Dec 25, 2016

Hi there,

I am trying to build the library for both Android and iOS. So far no success and I have found the following problems:

  • the spice-protocol recipe of https://github.com/flexVDI/cerbero is referring to a private repository: https://git.flexvdi.com/scm/flexvdi/spice-protocol.git, I replaced it with https://github.com/flexVDI/spice-protocol.git hopping to get it to work but I am not sure if they are the same.
  • there are hardcoded paths in AndroidLauncher/app/jni/Android.mk that contain your username which obviously are problematic because not everyone shares the same username as you.
  • the latest version of gstreamer-android (https://gstreamer.freedesktop.org/data/pkg/android/1.10.2/) does not have armeabi-v7a so it can not be built.
  • building for x86 fails too because of undefined references
  • README reads In Frameworks, replace all static library dependencies, with the ones built with Cerbero but just like android, there are hardcoded paths in build settings: header search paths and library search paths.
  • Same reference error as android is preventing me from building it for iOS:

    Undefined symbols for architecture x86_64:
    "_SpiceGlibGlue_getNumberOfChannels", referenced from:
    _engine_spice_connect in spice.o
    _engine_spice_is_connected in spice.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

I would very much like to help solve these issues but I need some information like what version of gstreamer you are using? is sprice-protocol that I used the same as private repo?

But it should be pretty straight forward for you to solve these issues if you try to build the projects from scratch yourself. Regardless, I would very much like to jump in and any help is appreciated.

@everplays
Copy link
Author

It looks like you guys have forgotten to include implementation of SpiceGlibGlue_getNumberOfChannels in the repo all together:

https://github.com/flexVDI/launcher-mobile/search?utf8=%E2%9C%93&q=SpiceGlibGlue_getNumberOfChannels

Also a quick googling shows that SpiceGlibGlue_getNumberOfChannels is only used in this repo:

spiceglibglue_getnumberofchannels - google search 2016-12-26 11-46-06

spice-mono-glue.h is declaring it and spice.c is calling it but there is no implementation as far as I can tell.

@Zouuup
Copy link

Zouuup commented Jan 5, 2017

Same problem here, any update?

@xixip
Copy link

xixip commented Feb 9, 2017

I has the same problems when building iOS. recipe of https://github.com/flexVDI/cerbero is referring to a private repository. _SpiceGlibGlue_getNumberOfChannels is undefined in spiceglue, but defined in spiceglue-legacy.

@everplays
Copy link
Author

everplays commented Feb 9, 2017

For spiceglue I forked it and added the missing function: 6a22576, the missing function is added the spiceglue repo itself.

So far, I have removed all the non-standard implementations that FlexVDI has added (like sending shutdown signal via spice) and managed to build the app for both Android (ARM* and x86) and iOS. However, Now, application fails as soon as it initializes the main channel on Android. I am trying to debug it which based on the fact that I have to use ARM emulator, it is going to be painful and slow. I will share my findings here if I succeeded.

But you are right about the private repositories! Also based on the fact that the number of private repositories is growing in Cerbero fork and nobody from FlexVDI's team care to respond to any of these issues, I really doubt if they have any plans to release the remaining source code.

* for building ARM on Android, all you need to do is to rename the armv7 directory to armeabi-v7a in gstreamer's extracted directory.

@slp
Copy link
Contributor

slp commented Feb 9, 2017

@xixip I've just updated the spice-protocol recipe to point to the public repo, and synced two commits to spiceglue that somehow got missing when we switched to GitHub.

@slp
Copy link
Contributor

slp commented Feb 9, 2017

@everplays Try the latest spice-protocol, which includes fixes for some alignment problems that arise when running under ARMv7 arch.

@everplays
Copy link
Author

@slp thanks. However, spice-gtk is also referring to a private repo. Could you please fix that as well? I am not sure if the public one and the private one are the same.

@jcelaya
Copy link
Member

jcelaya commented Feb 9, 2017

@everplays Hi, it should be working now. We have been doing some changes and things got out of sync

@everplays
Copy link
Author

@jcelaya thanks for looking into it. After using your latest changes on Cerbero and applying the following changes, I managed to build both Android versions successfully:

diff --git a/recipes/spice-gtk.recipe b/recipes/spice-gtk.recipe
index b7158d32..8b369551 100644
--- a/recipes/spice-gtk.recipe
+++ b/recipes/spice-gtk.recipe
@@ -4,7 +4,7 @@ class Recipe(recipe.Recipe):
     name = 'spice-gtk'
     version = '0.29-flexvdi'
     remotes = {'origin': 'https://github.com/flexVDI/spice-gtk.git'}
-    commit = 'v0.29-fv1'
+    commit = 'origin/master'
     # either LGPLv2.1 or MPLv1.1
     licenses = [License.LGPLv2_1]
     autoreconf = True 
@@ -34,9 +34,6 @@ class Recipe(recipe.Recipe):
                                           Platform.DARWIN,
                                           Platform.ANDROID]:
             self.configure_options += ' --enable-static --with-gtk=no --with-coroutine=gthread '
-            self.patches += ['spice-gtk/0003-Remove-spice_usb_device_get_libusb_device-symbol-fro.patch',
-                             'spice-gtk/0004-Remove-spice_usb_device_get_libusb_device-from-spice.patch',
-                             'spice-gtk/0005-Remove-set_va_display_hook-symbol-from-linker-files.patch']
         elif self.config.target_platform == Platform.WINDOWS:
             self.configure_options += ' --with-gtk=no'
             self.configure_options += ' --enable-usb-redir --with-usb-ids-path=./usb.ids'
@@ -45,7 +42,6 @@ class Recipe(recipe.Recipe):
             self.use_system_libs = True
             self.configure_options += ' --with-gtk=3.0 --enable-spicy=no --disable-vala'
             self.configure_options += ' --enable-usb-redir --with-usb-ids-path=./usb.ids'
-            self.patches.append('spice-gtk/0002-use-alsasink-instead-of-autoaudiosink.patch')
             if self.config.variants.va:
                 self.configure_options += ' --enable-va'
                 self.deps += ['libva']
diff --git a/recipes/spiceglue.recipe b/recipes/spiceglue.recipe
index 091a1ac2..1cae15fe 100644
--- a/recipes/spiceglue.recipe
+++ b/recipes/spiceglue.recipe
@@ -4,7 +4,7 @@
 class Recipe(recipe.Recipe):
     name = 'spiceglue'
     version = '2.2.36'
-    commit = 'winClientv2.2.36'
+    commit = 'origin/master'
     remotes = {'origin': 'https://github.com/flexvdi/spiceglue'}
 
     autoreconf = True

@everplays
Copy link
Author

Please note that the patches do not apply anymore. That's why I had to remove them.

@everplays
Copy link
Author

@slp @jcelaya yet another question: how do you test the x86 version of the Android build? I am using MacOS and both software and hardware graphics for emulator show nothing.

Software graphics emits:

E/libGLES_CM_swiftshader: badness: err prepareVertexData vendor/transgaming/swiftshader_source/src/OpenGL/libGLES_CM/VertexDataManager.cpp:145 (An enabled vertex array has no buffer and no pointer.)
E/swiftshader: AndroidEnterDebugger

and hardware emits:

E/EGL_emulation: tid 3901: eglSurfaceAttrib(1146): error 0x3009 (EGL_BAD_MATCH)

Obviously they both are emulator issues but I was wondering how you've overcome this. And if you haven't faced this issue, which version of SDK, NDK, and Emulator you're using with what image?

P.S. To test the ARM version, I used a phone and everything is working. Thanks :-)

@everplays
Copy link
Author

As it turned out, the patches were required for iOS. I regenerated them and made a PR for Cerbero with all of my changes. At this stage, if someone wants to build the project, it is possible, only they need to manually do the following steps:

  • for Android, the armv7 directory should be renamed to armeabi-v7a in ~/gstreamer (maybe it should be mentioned in the readme).
  • for iOS, you need to copy some files, like spice.proto, from spice-protocol's source tree to ~/cerbero/dist/ios_universal/lib/spice-protocol/ (probably can be fixed but I was tired and just wanted to get it working).

I will make a separate PR for the hardcoded paths of this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants