openDsh / openauto

AndroidAuto headunit emulator
33 stars 26 forks source link

Unable to build #5

Closed kylegordon closed 4 years ago

kylegordon commented 4 years ago

Hi,

Natively building on a Raspberry Pi3, I am met with the below error after executing this:

cmake -DCMAKE_BUILD_TYPE=Release -DRPI3_BUILD=TRUE -DAASDK_INCLUDE_DIRS="~/aasdk/include" -DAASDK_LIBRARIES="~/aasdk/lib/libaasdk.so" -DAASDK_PROTO_INCLUDE_DIRS="~/aasdk_build" -DAASDK_PROTO_LIBRARIES="~/aasdk/lib/libaasdk_proto.so" ~/openauto

CMake Error at cmake_modules/Findaasdk.cmake:36 (message):
  aasdk was found but not built.  Perform an in-source build.
Call Stack (most recent call first):
  CMakeLists.txt:47 (find_package)

aasdk has already been successfully built on the machine (which is what I've done to offer https://github.com/openDsh/aasdk/pull/7), but for some reason OpenDsh/openauto is failing to find the built aasdk objects.

Was working on supplying some build instructions for openauto too! Interestingly, https://github.com/rsjudka/intelligent-auto is building just fine.

rsjudka commented 4 years ago

Yeah anything in this org is still going to be 100% experimental (I think there's a branch in here that works tho)

The plan is to slowly migrate everything in intelligent-auto here and make it all super official and stuff

@jcwenger I think has been working towards consolidating everything from intelligent-auto into here

robert5974 commented 4 years ago

Just looking at what you supplied, I think your issue may be in the CMakeLists.txt. You need to verify where it thinks aasdk is located and include that. If it has aasdk listed, it may just be looking in the wrong place.

robert5974 commented 4 years ago

include_directories(${CMAKE_CURRENT_BINARY_DIR} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5MultimediaWidgets_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Bluetooth_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PROTOBUF_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${RTAUDIO_INCLUDE_DIRS} ${include_directory})

aasdk isn't in this list so I think you just add it here like:

${AASDK_INCLUDE_DIRS}

kylegordon commented 4 years ago

@rsjudka cool! sounds good :-)

I was hoping to get some build instructions together, and then hack up a cross-compiler within Docker for it. That way some builds can be done much quicker than on a Pi. Maybe even push towards generating some .deb files. I have cross-compile experience, but more from the infrastructure side than the developer side.

@robert5974 Thanks for the hints, will give it a shot and see where it takes me!

rsjudka commented 4 years ago

Yeah I know a few people already cross compile for the pi so I'm sure someone's got a setup for it already

Feel free to join the slack too where people are usually more responsive

https://join.slack.com/t/opendsh/shared_invite/zt-fcf38qpg-jjqFoP8v0z2tJJMYiteZHQ

jcwenger commented 4 years ago

Hey, the short answer is, you did like a sane person would think to do and you built aasdk in a separate folder called aasdk_build.

do the build right in aasdk, and it'll be happy.

The background behind this is that all the proto headers are codegenerated and I wasn't able to work out (yet?) how to locate them since you could call your "aasdk_build" folder literally any name you like, so searching for it is tough.

The long term strategy is to have both aasdk and openauto support make followed by sudo make install which will deploy the whole mess, headers and libs, into /usr/. That's about ready for review and PR, hoping to maybe get some time to work that this week.

kylegordon commented 4 years ago

It's built and running, thank you!

Although I really should test on a fresh Pi install... tomorrow :-)