simonfuhrmann / mve

Multi-View Environment
http://www.gcc.tu-darmstadt.de/home/proj/mve/
Other
977 stars 419 forks source link

Problems at make the MVE during installation #560

Closed dectun closed 2 years ago

dectun commented 2 years ago

At first. Thanks for your help. I need it.

I did uninstall al packages. And restart the installation.

I did install homebrew, with any help. And when I put the command "make" or "make -j8". I change the line 149 of system.h. I put; "defined)aarch64)" and "else". But it return me 20 errors.

I put here all text that it return me.

dectun@MacDectun mve % make -j8 /Library/Developer/CommandLineTools/usr/bin/make -C libs /Library/Developer/CommandLineTools/usr/bin/make -C math

ar rcs libmve_math.a

/Library/Developer/CommandLineTools/usr/bin/make -C util make[2]: `libmve_util.a' is up to date. /Library/Developer/CommandLineTools/usr/bin/make -C mve c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -fPIC -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o bundle_io.o bundle_io.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -fPIC -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o image_exif.o image_exif.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -fPIC -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o image_io.o image_io.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -fPIC -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o mesh_io.o mesh_io.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -fPIC -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o mesh_io_ply.o mesh_io_ply.cc In file included from image_exif.cc:37: ../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]

else defined(i386) || defined(__x86_64) || defined(aarch64__)

     ^
     //

In file included from mesh_io.cc:15: In file included from ../../libs/mve/mesh_io_ply.h:16: ../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]

else defined(i386) || defined(__x86_64) || defined(aarch64__)

     ^
     //

In file included from bundle_io.cc:18: ../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]

else defined(i386) || defined(__x86_64) || defined(aarch64__)

     ^
     //

In file included from image_io.cc:38: ../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]

else defined(i386) || defined(__x86_64) || defined(aarch64__)

     ^
     //

In file included from mesh_io_ply.cc:21: In file included from ../../libs/mve/mesh_io_ply.h:16: ../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]

else defined(i386) || defined(__x86_64) || defined(aarch64__)

     ^
     //

1 warning generated. 1 warning generated. 1 warning generated. 1 warning generated. 1 warning generated. ar rcs libmve.a bundle.o bundle_io.o camera.o depthmap.o image_exif.o image_io.o image_tools.o marching.o mesh.o mesh_info.o mesh_io.o mesh_io_npts.o mesh_io_obj.o mesh_io_off.o mesh_io_pbrt.o mesh_io_ply.o mesh_io_smf.o mesh_tools.o scene.o view.o volume.o /Library/Developer/CommandLineTools/usr/bin/make -C sfm c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o bundler_matching.o bundler_matching.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o cascade_hashing.o cascade_hashing.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o nearest_neighbor.o nearest_neighbor.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o ransac_fundamental.o ransac_fundamental.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o ransac_homography.o ransac_homography.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o ransac_pose_p3p.o ransac_pose_p3p.cc c++ -Wall -Wextra -Wundef -pedantic -mcpu=apple-m1 -funsafe-math-optimizations -fno-math-errno -std=c++11 -g -O3 -pthread -I../../libs -I/opt/homebrew/opt/qt@5/include -c -o visualizer.o visualizer.cc In file included from nearest_neighbor.cc:42: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/emmintrin.h:13:In file included from /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/xmmintrin.h:13: /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:33:5: error: use of undeclared identifier 'builtin_ia32_emms'; did you mean 'builtin_isless'? builtin_ia32_emms(); ^ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:33:5: note: 'builtin_isless' declared here /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:33:25: error: too few arguments to function call, expected 2, have 0 __builtin_ia32_emms();


/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:50:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
                  ^
In file included from ransac_fundamental.cc:15:
../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]
#   else defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
         ^
         //
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:67:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
    return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
           ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:129:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
    return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
In file included from ransac_pose_p3p.cc:14:
../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]
#   else defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
         ^
         //
In file included from ransac_homography.cc:15:
../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]
#   else defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
         ^
         //
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:159:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
    return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:189:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
    return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:216:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
    return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:239:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd'
    return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:260:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq'
    return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:287:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw'
    return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:310:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd'
    return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:331:19: error: use of undeclared identifier '__builtin_ia32_punpckldq'
    return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
                  ^
In file included from cascade_hashing.cc:14:
In file included from ../../libs/sfm/cascade_hashing.h:24:
../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]
#   else defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
         ^
         //
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:352:19: error: use of undeclared identifier '__builtin_ia32_paddb'; did you mean '__builtin_arm_addg'?
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:352:19: note: '__builtin_arm_addg' declared here
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:352:19: error: first argument of MTE builtin function must be a pointer ('__v8qi' (vector of 8 'char' values) invalid)
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
                  ^                    ~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:373:19: error: use of undeclared identifier '__builtin_ia32_paddw'; did you mean '__builtin_arm_addg'?
    return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:352:19: note: '__builtin_arm_addg' declared here
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:373:19: error: first argument of MTE builtin function must be a pointer ('__v4hi' (vector of 4 'short' values) invalid)
    return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
                  ^                    ~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:394:19: error: use of undeclared identifier '__builtin_ia32_paddd'; did you mean '__builtin_arm_addg'?
    return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:352:19: note: '__builtin_arm_addg' declared here
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/mmintrin.h:394:19: error: first argument of MTE builtin function must be a pointer ('__v2si' (vector of 2 'int' values) invalid)
    return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
                  ^                    ~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
In file included from bundler_matching.cc:21:
In file included from ../../libs/sfm/cascade_hashing.h:24:
../../libs/util/system.h:149:10: warning: extra tokens at end of #else directive [-Wextra-tokens]
#   else defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
         ^
         //
make[2]: *** [nearest_neighbor.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
make[1]: *** [all] Error 2
make: *** [all] Error 2
dectun commented 2 years ago

Hello. I`m thinking that I would change the program. Because I need a one platform to work. I hope will try this software in the future. Very much thanks for your help, really.

simonfuhrmann commented 2 years ago

You should for sure try out multiple programs, even if you get MVE to work. The results always differ and one program may be much more suited for your needs.

Regarding the remiaining issues.

First, you get a lot of warnings (those saying "extra tokens") because you changed the #elif to an #else. It's just a warning so it should be fine.

Second, it seems you're running onto issues with the SSE instructions. Try editing libs/sfm/nearest_neighbor.cc and delete these lines:

#include <emmintrin.h> // SSE2
#include <pmmintrin.h> // SSE3

And put this line instead:

#define ENABLE_SSE2_NN_SEARCH 0

This will avoid using SSE instructions, but make feature matching very slow.

I'm not entirely sure why you see this error, but it appears to be an issue with these system-provided headers? It doesn't look like an MVE issue, but I'm not sure.

dectun commented 2 years ago

ooooh!!! its works. You are my hero. All of you are my hero. And all of you have a mention in my job to implemate this apps at paleontologic departament. About your helps and the community support Captura de Pantalla 2022-04-16 a las 21 22 14 .

simonfuhrmann commented 2 years ago

Haha well, now comes the hard part of actually getting results.