alejandrorosas / android-uvc-rtmp-stream

UVC Rtmp Stream App for Android
Apache License 2.0
26 stars 13 forks source link

error: Cannot determine word size #88

Closed Ivan421399 closed 2 years ago

Ivan421399 commented 2 years ago

I'm trying to build this app and keep getting this error:

.../android-uvc-rtmp-stream/libraries/libuvccamera/jni/libjpeg-turbo-2.0.6/./jchuff.c:391:2: error: Cannot determine word size
#error Cannot determine word size

I'm not familiar with libjpeg-turbo, can anyone help me?

Edit: I'm on Ubuntu, is Windows required to build libjpeg-turbo?

alejandrorosas commented 2 years ago

Hey, I think it should work on linux, the one I tested and it does not build is in Windows, but I have it running on MacOS so unix, and github actions is using ubuntu, so it should work in linux

Ivan421399 commented 2 years ago

Maybe it's because I use the older version of Ubuntu. I will post the result in the future. TY

Edit: it didn't work. Are you using 32 or 64?

Ivan421399 commented 2 years ago

I think I know the reason. There is no x86_64 architecture variant in Android.mk for libjpeg-turbo-2.0.6. The 1.5.0 version of libjpeg-turbo works fine for me and it has that arch branch in its Android.mk.

Who should I contact with regarding this lib? Because I'm not sure who made your android one. Or better how do I make my compilator to ignore the x86_64 arch like yours does?

Ivan421399 commented 2 years ago

I made your app to run. I simply ran app on a phone instead of building the project with "Make Project" (hammer button). It looks like the problem is in my IDE. Sorry for bothering you.

P.S. It still would be very kind if anybody could explain to me how to make "Make Project" to not ignore abi filters.

pabiagioli commented 2 years ago

I found the same issue, this is related to the abiFilters. Apparently x86 and probably x86_64 is not supported. You need to change the gradle file like this: https://github.com/alejandrorosas/android-uvc-rtmp-stream/blob/master/libraries/libuvccamera/build.gradle

android {
    ndkVersion "22.1.7171670"
    compileSdkVersion 30
    externalNativeBuild {
        ndkBuild {
            path "jni/Android.mk"
        }
    }

    defaultConfig {
        ndk {
            abiFilters "armeabi-v7a", "arm64-v8a"
        }
    }

    sourceSets.main {
        jni.srcDirs "jni"
    }
}
alejandrorosas commented 2 years ago

Thanks @pabiagioli just updated the project with your suggestion https://github.com/alejandrorosas/android-uvc-rtmp-stream/pull/99