DIPlib / diplib

Quantitative Image Analysis in C++, MATLAB and Python
https://diplib.org
Apache License 2.0
211 stars 48 forks source link

Fails to build on i386: error: constructor cannot be redeclared #162

Closed yurivict closed 1 week ago

yurivict commented 1 week ago

Component n/a

Describe the bug

In file included from /wrkdirs/usr/ports/graphics/diplib/work/diplib-3.5.0/src/analysis/chord_length.cpp:31:
In file included from /wrkdirs/usr/ports/graphics/diplib/work/diplib-3.5.0/include/diplib/regions.h:26:
In file included from /wrkdirs/usr/ports/graphics/diplib/work/diplib-3.5.0/include/diplib/measurement.h:30:
/wrkdirs/usr/ports/graphics/diplib/work/diplib-3.5.0/include/diplib/label_map.h:62:16: error: constructor cannot be redeclared
      explicit LabelMap( std::vector< dip::uint > const& labels ) {
               ^
/wrkdirs/usr/ports/graphics/diplib/work/diplib-3.5.0/include/diplib/label_map.h:54:16: note: previous definition is here
      explicit LabelMap( std::vector< LabelType > const& labels ) {
               ^
6 warnings and 1 error generated.

log

To Reproduce regular build

System information:

crisluengo commented 1 week ago

I'm guessing you have a 32-bit system? I hadn't thought of that... We should add a 32-bit build on the CI.

yurivict commented 1 week ago

i386 is 32-bit system.

crisluengo commented 1 week ago

There seems to be a similar issue with the two definitions of GetLabelBoundingBox(). I'll look into that one in the morning.

crisluengo commented 1 week ago

@yurivict Thank you for reporting this! The library now builds on with gcc -m32 on GitHub CI. I'm expecting you'll be able to build on your machine now.

There are a few tests that are failing now. I will look into that over the coming days.

yurivict commented 1 week ago

@crisluengo Thanks! I will test it once the next version would come out.