-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Clang] Compiling issues in Develop branch #102
Comments
Hi Simone, I have tried on clang and gcc two different linux and everything run fine (fine for the travis CI too). For For the Can you tell me if it is ok on your side? Thanks @simogasp |
Hi Pierre, Beside the compilation error, I'm referring to this I don't see any Fit() method. On the other hand I agree it is kind of bizarre that it compiles on the other systems (but maybe it will give a run-time error in the test, I haven't tried that). Maybe some compilers are more permissive with the type checking, I don't know... As for the other error, if I comment out the previous test case, everything compiles smoothly. Thanks! S. PS |
Hi Simone, Kernel concept embed reference to the data used for the fitting and a model solver and a metric (to measure data consistency to the computed model). The object you referring too is the model solver l1SixPointResectionSolver that is used just below in a KERNEL l1PoseResectionKernel. We need to understand the strange behavior you have met. |
Yes, sorry, I got lost in the code and I didn't see well what you did in the typedef. S. |
Hi Pierre, Here are a bunch of things to fix in ceres:
Apparently in the new version of clang
Commenting out the constant everything goes fine. A+ S. |
@simogasp can you tell me if the 0.6 version is ok ? |
Compilation with clang is now checked on travis. |
I still have problems compiling with clang (LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)):
which may be a bug in clang (http://llvm.org/bugs/show_bug.cgi?id=18768) or maybe something on my side. S. |
BTW which clang version are u using on travis? is there a way to find it out? |
Not that it is the source of the problem, but why compile with -O4 flag?
|
@simogasp : I have update the last version of Ceres in the develop branch. For the assembler problem I don't know where it comes from. |
@donlk see the link in my message above, it's something related to the new version of clang. It's set by default by Ceres, so it should be up to them to fix it. With my workaround described above it works for me. @pmoulon i checked and even in the last version of ceres it is not fixed. As for the assembler error I have no clue. I will try to install an older version of clang (and next time i'll be more careful when accepting updates :-) |
Hi @pmoulon , Thanks! S. |
@rperrot Your guess was right. |
@pmoulon To be a little bit more precise :
But for a quick fix, disabling flto on all clang builds could be fine since it does not have any impact on openMVG performance. |
Hi Pierre,
today I cloned a fresh copy of the repository and when I started compiling I got a lot of compilation errors. I saw there are some issues that have been solved in the
develop
branch so I switched to it. I still got a couple of errors though. Here's a brief report.(Before starting, I'm on Mac OSX 10.9.2, compiling both with
clang
andgcc 4.8
)Issue with both clang and gcc
When linking
openMVG_lInftyCV_test_resection_robust
I got this error:After browsing the code a bit I found out that you have declared the
l1SixPointResectionSolver
kernel (inlInfinity/resection_kernel.hpp
) without providing a methodFit()
, as required by the functionMaxConsensus()
inrobust_estimation/robust_estimator_MaxConsensus.hpp
.My solution was to... disable the test in the CMakeList.txt! 😄 Actually, I haven't had time to understand all the code, so I don't know exactly what goes inside the method
Fit()
. My suggestion, though, is to rather create an abstract classKernel
with the methods to implements and avoid using the template: in this case genericity has to be avoided as we explicitly call some class methods insideMaxConsensus()
.Issue with clang
The other compilation error that I got only with clang occured when compiling
SfMGlobalEngine
. I got a bunch of this:So I guess clang (for reference, my version is 500.2.79) is a bit more conservative when resolving ambiguous references. I added
tthread::
as suggested wherever the compiler complained and everything went smooth.In case I can make you a pull request for this minor changes.
A+
S.
The text was updated successfully, but these errors were encountered: