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

Compilation error on Mint/Ubuntu 14.04 #614

Closed
tw0023 opened this issue Aug 22, 2016 · 5 comments
Closed

Compilation error on Mint/Ubuntu 14.04 #614

tw0023 opened this issue Aug 22, 2016 · 5 comments

Comments

@tw0023
Copy link

tw0023 commented Aug 22, 2016

Hi, I was trying to build openMVG on Mint/Ubuntu 14.04 platform but encountered some compilation errors, which seems to be related with gcc (4.7):

/usr/include/c++/4.7/bits/stl_tree.h:130:12: error: use of deleted function ‘constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const unsigned int; _T2 = std::unique_ptropenMVG::features::Regions; std::pair<_T1, _T2> = std::pair<const unsigned int, std::unique_ptropenMVG::features::Regions >]’

/usr/include/c++/4.7/bits/stl_pair.h:119:17: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = openMVG::features::Regions; _Dp = std::default_deleteopenMVG::features::Regions; std::unique_ptr<_Tp, _Dp> = std::unique_ptropenMVG::features::Regions]’
In file included from /usr/include/c++/4.7/memory:86:0,

/usr/include/c++/4.7/bits/unique_ptr.h:262:7: error: declared here

Thanks in advance!

@pmoulon
Copy link
Member

pmoulon commented Aug 22, 2016

Since unique_ptr is supported from GCC 4.4.7 I have no idea yet.

@rperrot any idea?

@rperrot
Copy link
Contributor

rperrot commented Aug 22, 2016

Just to make some investigations, could you give us more details :

  1. Could you give us a more complete message about the compilation (I want to know where is the error, is it openMVG or openMVG's dependencies related ?)
  2. Which branch did you used ?

@pmoulon First impression, maybe it's a STL related issue (c++11 is not fully supported on gcc4.7, maybe a const or a ref issue).

@donlk
Copy link
Contributor

donlk commented Aug 22, 2016

Ran into this problem myself with GCC 4.7. Only GCC >= 4.8 supports the fully range of c++11 features, and the move operations are quite messy. A number of alterations in regards to unique pointer handling need to be applied to OpenMVG to make it compatible.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53584

I think the posted issue is from the sfm_*_provider source files. The easiest solution is to just replace every unique_ptr with shared_ptr in those headers.

@pmoulon
Copy link
Member

pmoulon commented Aug 22, 2016

As said by @donlk:

Please update your GCC, some recent modification make OpenMVG require a GCC >=4.8
The build instruction where updated in the develop branch see here https://github.com/openMVG/openMVG/blob/develop/BUILD#L24

@tw0023
Copy link
Author

tw0023 commented Aug 24, 2016

Thanks for the replies! Using GCC-4.8 solved the problem

@pmoulon pmoulon closed this as completed Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants