Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#58784 closed defect (fixed)

opencv @3.4.7_0: error: use of undeclared identifier '_mm256_cvtps_ph'

Reported by: macdeport Owned by: Chris Jones <jonesc@…>
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: cjones051073 (Chris Jones)
Port: opencv

Description (last modified by mf2k (Frank Schima))

main.log.tbz

...
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/opencv-3.4.7/modules/core/include/opencv2/core/hal/intrin_avx.hpp:2782:18: error: use of undeclared identifier '_mm256_cvtps_ph'
:info:build     __m128i ah = _mm256_cvtps_ph(a.val, 0);
:info:build                  ^
:info:build 6 errors generated.
:info:build make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/count_non_zero.avx2.cpp.o] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/build'
:info:build make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/build" && /usr/bin/make -j8 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build opencv: command execution failed
:debug:build Error code: CHILDSTATUS 28463 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/main.log for details.

Attachments (4)

main.log.tbz (15.0 KB) - added by macdeport 5 years ago.
main.log-190804.tbz2 (15.0 KB) - added by macdeport 5 years ago.
configure.log.bz2 (12.8 KB) - added by cjones051073 (Chris Jones) 5 years ago.
configure.log-190804.tbz2 (14.3 KB) - added by macdeport 5 years ago.

Download all attachments as: .zip

Change History (28)

Changed 5 years ago by macdeport

Attachment: main.log.tbz added

comment:1 Changed 5 years ago by mf2k (Frank Schima)

In the future, please use WikiFormatting.

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Description: modified (diff)
Keywords: build removed
Type: updatedefect

comment:3 Changed 5 years ago by macdeport

Of course "Preformatted Text"

Thanks for pointing this : Sorry, the next time I will do.

Thanks also for running and improving MacPorts.

comment:4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: cjones051073 added
Summary: opencv 3.4.3_1 < 3.4.7_0 Failed to build opencv: command execution failedopencv @3.4.7_0: error: use of undeclared identifier '_mm256_cvtps_ph'

comment:5 Changed 5 years ago by cjones051073 (Chris Jones)

Looks like the compiler blacklist needs some tweaking, to prevent it picking

:info:configure -- The CXX compiler identification is AppleClang 7.0.2.7000181
:info:configure -- The C compiler identification is AppleClang 7.0.2.7000181
:info:configure -- Check for working CXX compiler: /usr/bin/c++
:info:configure -- Check for working CXX compiler: /usr/bin/c++ -- works

comment:6 Changed 5 years ago by Chris Jones <jonesc@…>

Owner: set to Chris Jones <jonesc@…>
Resolution: fixed
Status: newclosed

In 3120e9aeffd9f3001aba8a710feb484516226a5d/macports-ports (master):

opencv: add compiler blacklist
Closes: #58784

comment:7 Changed 5 years ago by macdeport

Still in error:

...
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/opencv-3.4.7/modules/core/include/opencv2/core/cvdef.h:725:39: error: use of undeclared identifier '_mm_cvtps_ph'; did you mean '_mm_cvtss_sd'?
:info:build         w = (ushort)_mm_cvtsi128_si32(_mm_cvtps_ph(v, 0));
:info:build                                       ^~~~~~~~~~~~
:info:build                                       _mm_cvtss_sd
:info:build /Library/Developer/CommandLineTools/usr/bin/../lib/clang/7.0.2/include/emmintrin.h:420:1: note: '_mm_cvtss_sd' declared here
:info:build _mm_cvtss_sd(__m128d __a, __m128 __b)
:info:build ^
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/build/modules/core/mathfuncs_core.avx2.cpp:2:

Changed 5 years ago by macdeport

Attachment: main.log-190804.tbz2 added

comment:8 Changed 5 years ago by cjones051073 (Chris Jones)

Are you sure you updated properly ? your build is still using /usr/bin/c++ which should have been explicitly blacklisted in the above commit.

comment:9 Changed 5 years ago by kencu (Ken)

It probably goes to /usr/bin/cc because it doesn't have anything on the fallback list that is not blacklisted to choose.

:warn:configure All compilers are either blacklisted or unavailable; defaulting to first fallback option
:debug:configure Environment: 
:debug:configure CC='/usr/bin/cc'
Last edited 5 years ago by kencu (Ken) (previous) (diff)

comment:10 Changed 5 years ago by cjones051073 (Chris Jones)

In my case with my 10.10 VM it picks macports 5.0. I don't see why this would behave differently...

comment:11 Changed 5 years ago by cjones051073 (Chris Jones)

Also, I thought macports clang 5.0 was always in the fallback list by default. It shouldn't need explicitly adding no ?

comment:12 Changed 5 years ago by cjones051073 (Chris Jones)

This is what I see

--->  Configuring opencv
DEBUG: Preferred compilers: clang macports-clang-5.0 macports-clang-4.0 macports-clang-3.9 macports-clang-3.7 macports-clang-3.4 macports-llvm-gcc-4.2 apple-gcc-4.2
DEBUG: Using compiler 'MacPorts Clang 5.0'
DEBUG: Executing proc-pre-org.macports.configure-configure-0
DEBUG: CPPFLAGS="-isystem/opt/local/include -I/opt/local/include/LegacySupport -I/opt/local/include/LegacySupport" inserted into CFLAGS="-Os -I/opt/local/include/LegacySupport -I/opt/local/include/LegacySupport -DNDEBUG -isystem/opt/local/include -I/opt/local/include/LegacySupport -I/opt/local/include/LegacySupport" CXXFLAGS="-Os -DNDEBUG -isystem/opt/local/include -I/opt/local/include/LegacySupport -I/opt/local/include/LegacySupport -stdlib=libc++"
DEBUG: Executing proc-pre-org.macports.configure-configure-1
DEBUG: Executing proc-pre-org.macports.configure-configure-2
DEBUG: Executing org.macports.configure (opencv)
DEBUG: Environment: 
CC='/opt/local/bin/clang-mp-5.0'

full log for configure step attached.

Above preferred compiler list is what I would expect to see. This is a box standard install of Macports in a 10.10 VM, I have not teased anything... I have to assumed the OP has tweaked something to change this in their case...

Changed 5 years ago by cjones051073 (Chris Jones)

Attachment: configure.log.bz2 added

comment:13 Changed 5 years ago by cjones051073 (Chris Jones)

macdeport - Please run

sudo port clean opencv
sudo port -d configure opencv 2>&1 | tee configure.log

and post what you get.

comment:14 Changed 5 years ago by cjones051073 (Chris Jones)

Also note, whilst I cannot point you to a log the build also worked fine in the build bots

http://packages.macports.org/opencv/

binaries exist down to mac OS 10.9 (Darwin 13). So clearly the build there also picked a working compiler too...

Incidentally, macdeport - Why are you building from source anyway, rather than using the binary tarballs ? Is this intentional ? Perhaps whatever change to your macports configuration you have done to cause this, is also why the builds do not work for you ....

Changed 5 years ago by macdeport

Attachment: configure.log-190804.tbz2 added

comment:15 in reply to:  13 Changed 5 years ago by macdeport

Replying to cjones051073:

macdeport - Please run

sudo port clean opencv
sudo port -d configure opencv 2>&1 | tee configure.log

and post what you get.

Here posted the resulting log.

comment:16 in reply to:  14 Changed 5 years ago by macdeport

Replying to cjones051073:

Also note, whilst I cannot point you to a log the build also worked fine in the build bots

http://packages.macports.org/opencv/

binaries exist down to mac OS 10.9 (Darwin 13). So clearly the build there also picked a working compiler too...

Incidentally, macdeport - Why are you building from source anyway, rather than using the binary tarballs ? Is this intentional ? Perhaps whatever change to your macports configuration you have done to cause this, is also why the builds do not work for you ....

I am not a MacPorts, nor a Unix, expert : I simply appreciate and survive (well in general)...

If there is anything I can do to improve my configuration, it will be with pleasure, if you guide me. Thank you.

comment:17 Changed 5 years ago by cjones051073 (Chris Jones)

A default installation will be using the binary tarballs when available. If your installation is not then there must be some reason. Without more details on what you did when you set up it, I cannot help more.

comment:18 Changed 5 years ago by cjones051073 (Chris Jones)

do you get binary tarballs for other ports, or is everything installed from source for you ?

comment:19 Changed 5 years ago by cjones051073 (Chris Jones)

You appear to not have Xcode installed. i.e. you have

DEBUG: OS X 10.10 (darwin/14.5.0) arch i386
DEBUG: MacPorts 2.5.4
DEBUG: Xcode none
DEBUG: SDK 10.10
DEBUG: MACOSX_DEPLOYMENT_TARGET: 10.10
Warning: Xcode does not appear to be installed; most ports will likely fail to build.

I have

DEBUG: MacPorts 2.5.4
DEBUG: Xcode 7.0.1
DEBUG: SDK 10.10
DEBUG: MACOSX_DEPLOYMENT_TARGET: 10.10

you should have paid attention to the warning above. Please install Xcode and try again.

comment:20 in reply to:  18 Changed 5 years ago by macdeport

Replying to cjones051073:

do you get binary tarballs for other ports, or is everything installed from source for you ?

Yes in general I get binary tarballs and some time MacPorts update are automatically though compilation

comment:21 in reply to:  19 Changed 5 years ago by macdeport

Replying to cjones051073:

You appear to not have Xcode installed. i.e. you have

DEBUG: OS X 10.10 (darwin/14.5.0) arch i386
DEBUG: MacPorts 2.5.4
DEBUG: Xcode none
DEBUG: SDK 10.10
DEBUG: MACOSX_DEPLOYMENT_TARGET: 10.10
Warning: Xcode does not appear to be installed; most ports will likely fail to build.

I have

DEBUG: MacPorts 2.5.4
DEBUG: Xcode 7.0.1
DEBUG: SDK 10.10
DEBUG: MACOSX_DEPLOYMENT_TARGET: 10.10

you should have paid attention to the warning above. Please install Xcode and try again.

You're absolutely right I didn't install XCode and its GBs that I don't have the use of but only the command tools as indicated in a reference I don't retrieves at time.

In addition, I tried a clean reinstallation of OpenCV:

sudo port clean --all opencv
sudo port uninstall opencv port
sudo port -v install opencv @3.4.7_0+python37
...
Error: Processing of port opencv failed

How to install the compiled version directly?

comment:22 Changed 5 years ago by cjones051073 (Chris Jones)

you are using a non default variant (python37). This is why you are not using the binary install tarballs, because these are only available for the default variants of each port.

If you want to use the binary install, remove +python37. Otherwise, I am afraid I am out of ideas as to why building from source is not working for you, sorry.

comment:23 Changed 5 years ago by cjones051073 (Chris Jones)

b.t.w. you are correct *some* ports can be built without having Xcode installed. However, as the warning above notes not having it installed is likely to cause problems. If you have happy to live with this, fine, that's up to you. Otherwise just install Xcode.... Your choice.

comment:24 Changed 5 years ago by macdeport

At this time there are 608 ports installed here and over several years opencv +python37 is the 1st in this situation: maybe I was especially lucky in this area?

Anyway, thank you for your careful help.

Note: See TracTickets for help on using tickets.