aferrero2707 / PhotoFlow

A fully non-destructive photo retouching program providing a complete layer-based workflow including RAW image development.
http://aferrero2707.github.io/PhotoFlow
GNU General Public License v3.0
315 stars 36 forks source link

Antergos build_all.sh fails #187

Closed alcomposer closed 5 years ago

alcomposer commented 5 years ago

Build all fails with errors:

In file included from /home/alexmitchell/Documents/github/PhotoFlow/src/base/photoflow.hh:35,
                 from /home/alexmitchell/Documents/github/PhotoFlow/src/base/cachebuffer.cc:41:
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:80:24: error: ‘IM_BANDFMT_UCHAR’ was not declared in this scope
     PF_BANDFMT_UCHAR = IM_BANDFMT_UCHAR,
                        ^~~~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:81:23: error: ‘IM_BANDFMT_CHAR’ was not declared in this scope
     PF_BANDFMT_CHAR = IM_BANDFMT_CHAR,
                       ^~~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:81:23: note: suggested alternative: ‘PF_BANDFMT_UCHAR’
     PF_BANDFMT_CHAR = IM_BANDFMT_CHAR,
                       ^~~~~~~~~~~~~~~
                       PF_BANDFMT_UCHAR
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:82:25: error: ‘IM_BANDFMT_USHORT’ was not declared in this scope
     PF_BANDFMT_USHORT = IM_BANDFMT_USHORT,
                         ^~~~~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:82:25: note: suggested alternative: ‘PF_BANDFMT_UCHAR’
     PF_BANDFMT_USHORT = IM_BANDFMT_USHORT,
                         ^~~~~~~~~~~~~~~~~
                         PF_BANDFMT_UCHAR
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:83:24: error: ‘IM_BANDFMT_SHORT’ was not declared in this scope
     PF_BANDFMT_SHORT = IM_BANDFMT_SHORT,
                        ^~~~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:83:24: note: suggested alternative: ‘PF_BANDFMT_USHORT’
     PF_BANDFMT_SHORT = IM_BANDFMT_SHORT,
                        ^~~~~~~~~~~~~~~~
                        PF_BANDFMT_USHORT
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:84:23: error: ‘IM_BANDFMT_UINT’ was not declared in this scope
     PF_BANDFMT_UINT = IM_BANDFMT_UINT,
                       ^~~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:84:23: note: suggested alternative: ‘PF_BANDFMT_SHORT’
     PF_BANDFMT_UINT = IM_BANDFMT_UINT,
                       ^~~~~~~~~~~~~~~
                       PF_BANDFMT_SHORT
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:85:22: error: ‘IM_BANDFMT_INT’ was not declared in this scope
     PF_BANDFMT_INT = IM_BANDFMT_INT,
                      ^~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:85:22: note: suggested alternative: ‘PF_BANDFMT_UINT’
     PF_BANDFMT_INT = IM_BANDFMT_INT,
                      ^~~~~~~~~~~~~~
                      PF_BANDFMT_UINT
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:86:24: error: ‘IM_BANDFMT_FLOAT’ was not declared in this scope
     PF_BANDFMT_FLOAT = IM_BANDFMT_FLOAT,
                        ^~~~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:86:24: note: suggested alternative: ‘PF_BANDFMT_SHORT’
     PF_BANDFMT_FLOAT = IM_BANDFMT_FLOAT,
                        ^~~~~~~~~~~~~~~~
                        PF_BANDFMT_SHORT
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:87:25: error: ‘IM_BANDFMT_DOUBLE’ was not declared in this scope
     PF_BANDFMT_DOUBLE = IM_BANDFMT_DOUBLE,
                         ^~~~~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/pftypes.hh:87:25: note: suggested alternative: ‘PF_BANDFMT_UINT’
     PF_BANDFMT_DOUBLE = IM_BANDFMT_DOUBLE,
                         ^~~~~~~~~~~~~~~~~
                         PF_BANDFMT_UINT
In file included from /home/alexmitchell/Documents/github/PhotoFlow/src/base/cachebuffer.cc:44:
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:369:32: error: ‘Rect’ does not name a type; did you mean ‘acct’?
   virtual void transform(const Rect* rin, Rect* rout, int /*id*/)
                                ^~~~
                                acct
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:369:43: error: ‘Rect’ has not been declared
   virtual void transform(const Rect* rin, Rect* rout, int /*id*/)
                                           ^~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:381:36: error: ‘Rect’ does not name a type; did you mean ‘acct’?
   virtual void transform_inv(const Rect* rout, Rect* rin, int /*id*/)
                                    ^~~~
                                    acct
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:381:48: error: ‘Rect’ has not been declared
   virtual void transform_inv(const Rect* rout, Rect* rin, int /*id*/)
                                                ^~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh: In member function ‘virtual void PF::OpParBase::transform(const int*, int*, int)’:
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:372:11: error: request for member ‘left’ in ‘* rout’, which is of non-class type ‘int’
     rout->left = rin->left+p;
           ^~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:372:23: error: request for member ‘left’ in ‘* rin’, which is of non-class type ‘const int’
     rout->left = rin->left+p;
                       ^~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:373:11: error: request for member ‘top’ in ‘* rout’, which is of non-class type ‘int’
     rout->top = rin->top+p;
           ^~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:373:22: error: request for member ‘top’ in ‘* rin’, which is of non-class type ‘const int’
     rout->top = rin->top+p;
                      ^~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:374:11: error: request for member ‘width’ in ‘* rout’, which is of non-class type ‘int’
     rout->width = rin->width-p*2;
           ^~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:374:24: error: request for member ‘width’ in ‘* rin’, which is of non-class type ‘const int’
     rout->width = rin->width-p*2;
                        ^~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:375:11: error: request for member ‘height’ in ‘* rout’, which is of non-class type ‘int’
     rout->height = rin->height-p*2;
           ^~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:375:25: error: request for member ‘height’ in ‘* rin’, which is of non-class type ‘const int’
     rout->height = rin->height-p*2;
                         ^~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh: In member function ‘virtual void PF::OpParBase::transform_inv(const int*, int*, int)’:
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:384:10: error: request for member ‘left’ in ‘* rin’, which is of non-class type ‘int’
     rin->left = rout->left-p;
          ^~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:384:23: error: request for member ‘left’ in ‘* rout’, which is of non-class type ‘const int’
     rin->left = rout->left-p;
                       ^~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:385:10: error: request for member ‘top’ in ‘* rin’, which is of non-class type ‘int’
     rin->top = rout->top-p;
          ^~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:385:22: error: request for member ‘top’ in ‘* rout’, which is of non-class type ‘const int’
     rin->top = rout->top-p;
                      ^~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:386:10: error: request for member ‘width’ in ‘* rin’, which is of non-class type ‘int’
     rin->width = rout->width+p*2;
          ^~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:386:24: error: request for member ‘width’ in ‘* rout’, which is of non-class type ‘const int’
     rin->width = rout->width+p*2;
                        ^~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:387:10: error: request for member ‘height’ in ‘* rin’, which is of non-class type ‘int’
     rin->height = rout->height+p*2;
          ^~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/operation.hh:387:25: error: request for member ‘height’ in ‘* rout’, which is of non-class type ‘const int’
     rin->height = rout->height+p*2;
                         ^~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/cachebuffer.cc: In member function ‘void PF::CacheBuffer::step()’:
/home/alexmitchell/Documents/github/PhotoFlow/src/base/cachebuffer.cc:108:18: error: ‘im_concurrency_get’ was not declared in this scope
   int nthreads = im_concurrency_get();
                  ^~~~~~~~~~~~~~~~~~
/home/alexmitchell/Documents/github/PhotoFlow/src/base/cachebuffer.cc:108:18: note: suggested alternative: ‘vips_concurrency_get’
   int nthreads = im_concurrency_get();
                  ^~~~~~~~~~~~~~~~~~
                  vips_concurrency_get
make[2]: *** [src/CMakeFiles/pfbase.dir/build.make:63: src/CMakeFiles/pfbase.dir/base/cachebuffer.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:280: src/CMakeFiles/pfbase.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
aferrero2707 commented 5 years ago

@alcomposer could you post the full cmake and make logs? I would like to check how LibVIPS is detected on your system.

Thanks!

alcomposer commented 5 years ago

build_log.txt

aferrero2707 commented 5 years ago

I have updated the build scripts to download a specific VIPS version (v8.7.4 at the moment), instead of the git HEAD. This version works fine on my system.

Could you please try re-running the build script like this?

CLEAN_VIPS=1 ./build_all.sh
alcomposer commented 5 years ago

Hmm, VIPS is now fine, but now rawspeed isn't happy! :-(

/home/alexmitchell/Documents/github/PhotoFlow/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:135:57: error: ‘const’ attribute on function returning ‘void’ [-Werror=attributes]
 void __attribute__((const)) RawImageData::poisonPadding() {
                                                         ^
/home/alexmitchell/Documents/github/PhotoFlow/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:156:59: error: ‘const’ attribute on function returning ‘void’ [-Werror=attributes]
 void __attribute__((const)) RawImageData::unpoisonPadding() {

build_log.txt

aferrero2707 commented 5 years ago

It seems that the RawSpeed library version in the master branch does not play well with recent compilers... could you try building the stable branch instead?

In any case, the stable branch is currently very much ahead of master, and I am trying to plan a new release in the not so far future. So I suggest to stick to the stable development branch to get the latest code (and in particular the OCIO part).

alcomposer commented 5 years ago

hmmm Just built with stable and get the same error.

RawImageData::poisonPadding() etc

aferrero2707 commented 5 years ago

That's strange... the implementation of the poisonPadding() function in the stable branch is here, and does not contain any __attribute__((const)) statement.

Are you sure your local git repository was correctly switched to the stable branch?

alcomposer commented 5 years ago

git checkout stable

git branch returns:

  master
* stable
aferrero2707 commented 5 years ago

I think you need to also do a

git pull origin stable

to update your local copy.

alcomposer commented 5 years ago

Ok, started again, did:

git checkout stable Output of git pull origin stable is:

From https://github.com/aferrero2707/PhotoFlow
 * branch              stable     -> FETCH_HEAD
Already up to date.

Get similar errors to original issue when building.

build_all_log.txt

aferrero2707 commented 5 years ago

Looks like the stderr is missing from your last build log... I can see that the compilation has failed, but not the error messages.

I am trying to build the AppImage with the same VIPS version, to see if I can reproduce the compilation issue (the code compiles fine on macOS).

alcomposer commented 5 years ago

Build with: ./build_all.sh |& tee output_log.txt :-/ build_log_stderr_stdout.txt

aferrero2707 commented 5 years ago

I was able to reproduce the issue with the AppImage build scripts.

I downgraded the VIPS version installed by build_all.sh to 8.5.9, which is the same as used for the AppImages. Could you do a git pull origin stable and recompile?

As before, please use

CLEAN_VIPS=1 ./build_all.sh

Meanwhile I will adapt the code to be compatible with the most recent VIPS versions...

Thanks!

alcomposer commented 5 years ago

Yup this resolved the issue. Thanks!