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

Drishti with Xcode 10.2 #752

Open
GORGES opened this issue Apr 19, 2019 · 19 comments
Open

Drishti with Xcode 10.2 #752

GORGES opened this issue Apr 19, 2019 · 19 comments

Comments

@GORGES
Copy link

GORGES commented Apr 19, 2019

Drishti fails to compile with MacOS 10.14 SDK. The error message is deep in the acf/NEON code, and says:

error: argument to '__builtin_ia32_vec_set_v8hi' must be a constant integer

I tried with many different MacOS toolchains, including xcode, gcc, xcode-10-14-cxx14, xcode-10-14.

I can supply a full log report if needed, but this problem should be easily repeatable.

@ruslo
Copy link
Collaborator

ruslo commented Apr 21, 2019

this problem should be easily repeatable

Drishti compiles fine for me.

Drishti version:

> git branch -vv
* master             c4c74f0d [origin/master] [skip ci] add note about ndk r19

Xcode version:

> xcodebuild -version
Xcode 10.1
Build version 10B61

CMake version:

> cmake --version
cmake version 3.14.2

Configure command:

> cmake -H. -B_builds -GXcode -DHUNTER_STATUS_DEBUG=ON -DDRISHTI_BUILD_EXAMPLES=ON

Build command:

> cmake --build _builds --config Release -j 8
...
echo Build\ all\ projects
Build all projects

** BUILD SUCCEEDED **

@headupinclouds
Copy link
Collaborator

You can also check to make sure the submodule w/ the config is up to date (for the latest config) in case you have an older clone:

git submodule update --init --recursive

Building w/ a new clone will also work:

git clone --recursive https://github.com/elucideye/drishti.git

Please post a full build log if the above hints don't help.

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

I am trying a rebuild now. One difference is that my "xcodebuild -version" returns "Xcode 10.2.1". If this also fails then I will do the submodule update command. I'll report back with the results. Thank you!!

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

Initial rebuild failed; here are the full log records: https://gist.github.com/GORGES/6445ac66b90faa9b9544acb845143f8a

Will try doing the submodule update and then try again.

PS: Will also update cmake using brew.

@ruslo
Copy link
Collaborator

ruslo commented Apr 22, 2019

Initial rebuild failed; here are the full log records: https://gist.github.com/GORGES/6445ac66b90faa9b9544acb845143f8a

I don't see any errors.

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

Aargh - there must be a limit on the GIST buffer. Sorry I should have checked after pasting. Here's the remainder, and thank you for checking!

https://gist.github.com/GORGES/33117de703ca019c87b3438a3e2571b1

@ruslo
Copy link
Collaborator

ruslo commented Apr 22, 2019

Here's the remainder, and thank you for checking!

Okay, I see the problem with ACF now, but the log is still not full. What ACF version it was?

Compare with this log:

- [hunter] ACF_ROOT: /Users/travis/.hunter/_Base/f58bcf2/ea1163a/a1b947a/Install (ver.: d1f681d6e678fcc45777e780f40fc196aad4c726)

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Locking directory: /Users/travis/.hunter/_Base/Download/acf/d1f681d6e678fcc45777e780f40fc196aad4c726/d1f681d

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Lock done

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Already locked: /Users/travis/.hunter/_Base/Download/acf/d1f681d6e678fcc45777e780f40fc196aad4c726/d1f681d

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Locking directory: /Users/travis/.hunter/_Base/f58bcf2/ea1163a/a1b947a

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Lock done

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Package 'acf' default arguments: 'ACF_BUILD_OGLES_GPGPU=ON;ACF_USE_DRISHTI_CACHE=OFF;ACF_BUILD_EXAMPLES=OFF;ACF_BUILD_TESTS=OFF'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Package 'acf' user arguments: 'ACF_BUILD_OGLES_GPGPU=ON;ACF_BUILD_TESTS=OFF;ACF_BUILD_EXAMPLES=OFF;ACF_SERIALIZE_WITH_CVMATIO=OFF;ACF_SERIALIZE_WITH_CEREAL=ON;ACF_BUILD_OGLES_GPGPU=ON'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_BUILD_OGLES_GPGPU' = 'ON'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_USE_DRISHTI_CACHE' = 'OFF'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_BUILD_EXAMPLES' = 'OFF'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_BUILD_TESTS' = 'OFF'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_BUILD_OGLES_GPGPU' = 'ON'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_BUILD_TESTS' = 'OFF'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_BUILD_EXAMPLES' = 'OFF'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_SERIALIZE_WITH_CVMATIO' = 'OFF'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_SERIALIZE_WITH_CEREAL' = 'ON'

-- [hunter *** DEBUG *** 2019-01-31T15:09:46] Add extra CMake args: 'ACF_BUILD_OGLES_GPGPU' = 'ON'

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

ruslo, I am trying to figure out which ACF version I am using, but the source is in the bowels of hunter. I pull up the directory (/Users/mclark/.hunter/_Base/f58bcf2/0c36441/a9fd39e/Build/acf/Source/src/lib/acf/), but don't see an explicit version file.

I fully admit that I am not hunter-savvy, so I don't know how to get the ACF version. I did see a reference to an ACF version, but it is an internal version number:

./_builds/ios/_3rdParty/Hunter/config-id/config.cmake:hunter_config(acf VERSION 75cabfb9dd786a4264be27758a73921b84c550c3 CMAKE_ARGS "ACF_BUILD_TESTS=OFF" "ACF_BUILD_EXAMPLES=OFF" "ACF_SERIALIZE_WITH_CVMATIO=OFF" "ACF_SERIALIZE_WITH_CEREAL=ON" "ACF_BUILD_OGLES_GPGPU=ON" "ACF_KEEPS_SOURCES=1" GIT_SUBMODULE_DIR "/Users/mclark/workspace/drishti/_builds/ios/_3rdParty/Hunter/git-archives")

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

It seems to pull the ACF version from a hunter variables:
./drishti-upload/config.cmake:# hunter_config(acf VERSION ${HUNTER_acf_VERSION} CMAKE_ARGS ${acf_cmake_args})

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

Found the ACF version in the Drishti source code:
./src/3rdparty/acf/CMakeLists.txt:project(acf VERSION 0.1.10)

@ruslo
Copy link
Collaborator

ruslo commented Apr 22, 2019

ruslo, I am trying to figure out which ACF version I am using

My point was that the logs were not full.

./_builds/ios/_3rdParty/Hunter/config-id/config.cmake:hunter_config(acf VERSION 75cabfb9dd786a4264be27758a73921b84c550c3

Your version doesn't match the version from CI logs:

- [hunter] ACF_ROOT: /Users/travis/.hunter/_Base/f58bcf2/ea1163a/a1b947a/Install (ver.: d1f681d6e678fcc45777e780f40fc196aad4c726)

I guess that's because you haven't updated submodules.

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

Hmm - I did run this command: "git submodule update --init --recursive" and then tried building again, but it failed.

I will next try your "git clone --recursive https://github.com/elucideye/drishti.git" and start from scratch.

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

I started with a fresh clone ("git clone --recursive https://github.com/elucideye/drishti.git") and ran into the same error. Here are the logs:
https://gist.github.com/GORGES/1ab2a759d9e9f69e541204e0f48636bd

I suspect the issue is in Xcode 10.2.1, since that seems to be the only significance difference between your setup and mine.

Question: should I override the ACF version that is specified in Drishti and try again?

@headupinclouds
Copy link
Collaborator

should I override the ACF version that is specified in Drishti and try again?

That won't help with this issue as the acf code hasn't been updated for this compiler.

I don't have an Xcode 10.2.1 system to investigate this. It requires an OS update to macOS Mojave, which I can't do right now. The best short term workaround will be to install an older Xcode release for now.

https://cgold.readthedocs.io/en/latest/first-step/native-build-tool/xcode.html#several-custom-xcode-versions

@ruslo
Copy link
Collaborator

ruslo commented Apr 22, 2019

Here are the logs: https://gist.github.com/GORGES/1ab2a759d9e9f69e541204e0f48636bd

At least the ACF version now matches version from CI.

I suspect the issue is in Xcode 10.2.1, since that seems to be the only significance difference between your setup and mine.

I can't run the test with Xcode 10.2 at this moment; I have to upgrade my hardware or setup Travis CI with new Xcode image.

@GORGES
Copy link
Author

GORGES commented Apr 22, 2019

Thanks again, Ruslo. I may try to revert to an earlier Xcode and try again.

Let me know about appropriate Github issue protocol - is this issue resolved or should it be kept open until Drishti/ACF are compatible with the current MacOS toolset?

@ruslo
Copy link
Collaborator

ruslo commented Apr 22, 2019

We will move to the Xcode 10.2 in the future anyway, so I guess it's okay to keep it open. I will rename the issue.

@ruslo ruslo changed the title Drishti does not compile with MacOS 10.14 SDK. Drishti with Xcode 10.2 Apr 22, 2019
@headupinclouds
Copy link
Collaborator

I've created an issue for the core ACF problem here elucideye/acf#106. We can leave both open.

@iPsych
Copy link

iPsych commented May 9, 2020

@headupinclouds
I also confirmed the same error happens in Xcode 10.2 in HighSierra, (10.2 is normally cannot be installed in 10.13.6, but installed with a little trick.). 10.1 was succeed exactly same setting.

The experiment also support the above reports.
Something not fit between acf and 10.2

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

4 participants