[Buildroot] [PATCH v2 06/18] package/opencv3: bump version to 3.1.0

Samuel Martin s.martin49 at gmail.com
Mon Mar 28 15:31:37 UTC 2016


On Mon, Mar 28, 2016 at 4:49 PM, Bernd Kuhls <bernd.kuhls at t-online.de> wrote:
> Am Sun, 27 Mar 2016 19:01:12 +0200 schrieb Samuel Martin:
>
>> On Sun, Mar 27, 2016 at 5:53 PM, Bernd Kuhls
>> <bernd.kuhls at t-online.de> wrote:
>>> Hi Samuel,
>>>
>>> Am Sun, 27 Mar 2016 15:05:42 +0200 schrieb Samuel Martin:
>>>
>>>>> -       -DWITH_OPENGL=OFF \
>>>>> -       -DWITH_OPENMP=OFF \
>>>> AFAICS, these 2 options still exist (see [2,3]).
>>>
>>> Yes, and they are used later on in opencv3.mk:
>>>
>>> ifeq ($(BR2_PACKAGE_OPENCV3_WITH_OPENGL),y)
>>> OPENCV3_CONF_OPTS += -DWITH_OPENGL=ON OPENCV3_DEPENDENCIES += libgl
>>> else OPENCV3_CONF_OPTS += -DWITH_OPENGL=OFF endif
>>>
>>> OPENCV3_CONF_OPTS += -DWITH_OPENMP=$(if
>>> $(BR2_GCC_ENABLE_OPENMP),ON,OFF)
>>>
>>> Is there a reason why they are disabled in the first place?
>> Yes, there is reason ;-)
>
> Hi Samuel,
>
> even after your last explanation I do not understand why -DWITH_OPENGL
> and -DWITH_OPENMP are present twice in opencv3.mk so I am going to repeat
> my question based on current buildroot git master:
>
> In line 207 opengl support is disabled:
> https://git.busybox.net/buildroot/tree/package/opencv3/opencv3.mk#n207
>>       -DWITH_OPENGL=OFF \
>
> In line 271 this command is repeated
> https://git.busybox.net/buildroot/tree/package/opencv3/opencv3.mk#n271
>>OPENCV3_CONF_OPTS += -DWITH_OPENGL=OFF
Well, clearly I should have drunk more coffe the day I did that.

>
> The same duplication is present for openmp
> https://git.busybox.net/buildroot/tree/package/opencv3/opencv3.mk#n208
>>       -DWITH_OPENMP=OFF \
>
> https://git.busybox.net/buildroot/tree/package/opencv3/opencv3.mk#n274
>>OPENCV3_CONF_OPTS += -DWITH_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF)
ditto

>
> I see no reason to keep lines 207-208.
Indeed, feel free to post a patch removing them ;-)

Note that in cmake, if the same definition is several time on the
commd line, the last occurence will win, so if one does:
  cmake . -DFOO=foo -DFOO=bar
the actual value of the FOO variable will be "bar".
So, in this case the duplicate options were harmless because the right
values are set after the wrong ones on the command line, but
nonetheless this is messy :-/. Sorry about that.

Regards,

-- 
Samuel


More information about the buildroot mailing list