-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add snapcraft.yaml file #776
Conversation
This is the recipe for creating a snap package of openMVG. See https://snapcraft.io for more information.
Thank you for this contribution. |
On 10/02/2017 08:37, Pierre Moulon wrote:
It's nice to have it, I would like to request you to consider also
install the sensor_width_camera_database.txt file.
Oh, indeed! I'll add that tonight!
|
I've updated the branch and added the camera DB file to the package. |
Thank you very much, will check it and merge it to develop for the next release. |
Hi Pierre! Just in case you are wondering how to test the package: make sure you have the
And the package will be installed. Note that in order to avoid namespace issues, all command are prefixed with
On the positive side, one can simply type |
@mardy the cmake script detect cpu instructions (SSE, AVX etc) how this his handled by canonical buildbots? |
On 12/02/2017 19:21, Romain Janvier wrote:
@mardy <https://github.com/mardy> the cmake script detect cpu
instructions (SSE, AVX etc) how this his handled by canonical buildbots?
Are you sure about it? I've just rebuilt it to double-check, and I
didn't see any mention of checking for SSE by cmake.
In the general case, I wish the detection could actually happen at
runtime; if that's not possible, then I guess we could publish the snap
under different names (openMVG, openMVG-sse, openMVG-avx, etc.)
depending on the situation.
|
https://github.com/openMVG/openMVG/blob/master/src/cmakeFindModules/FindSSE.cmake |
Here the line that I call Since I do not call AutodetectHostArchitecture, I don't think that fancy CPU support is enable by now. Default setting must just enable native build and SSE extension if the CPU is capable (SSE is pretty common now on every computer). Since the project is working fine on ARM target too, I think the cmake detection is working right. @mardy I think the best would be to put the snap file into a dir called ./dist and certainly that a tiny readme.md would be nice in order to explain to people how to create/obtain/How to use the snap. |
I agree @pmoulon, but since snaps are build on a buildfarm (for users that don't build them themself) this may lead to non reproductible builds. Worst, binary could be unusable and crash on host machine that do not support these instructions. Since you only use SSE2 it should be ok everywhere (more specially on 64 bits) now but I don't know how it's handled at third parties level (Eigen, Ceres, vlfeat...) |
Hi! I moved the file as requested, added a README, and updated the recipe to include a couple of useful python scripts. |
It seems the binary I've built indeed doesn't work on all machines (I've built it on an AMD CPU, and now I see that all programs crash at start on an Intel i7 ("illegall instruction").
Do I need to explicitly disable AVX when building? Could that be the cause of the error? |
Adding |
Hi Pierre! Thanks, that option helps :-) |
Detecting AVX at runtime is not too hard. |
Thanks, |
This is the recipe for creating a snap package of openMVG.
See https://snapcraft.io for more information.