Vcpkg: mathgl[hdf5]:x64-windows build failure

Created on 26 Sep 2019  路  3Comments  路  Source: microsoft/vcpkg

Host Environment

  • OS: Windows 10 1903
  • MSVC 2019 16.3.0

To Reproduce

vcpkg install mathgl[hdf5]:x64-windows

Failure logs

config-x64-windows-out.log
install-x64-windows-dbg-out.log

port-bug

Most helpful comment

Error:
C:\Dev\BasicTools\vcpkg\buildtrees\mathgl\src\2.4.3-ea7ba2a6a4\include\mgl2/datac.h(477): error C3861: 'mgl_abs': identifier not found

I did a search through all files in the source tree and this the only place it is used in the source code. The function is not defined anywhere.
Relevant Code:

#ifndef DEBUG
    /// Get the value in given cell of the data
    mreal v(long i,long j=0,long k=0) const {   return abs(a[i+nx*(j+ny*k)]);   }
    /// Set the value in given cell of the data
    void set_v(mreal val, long i,long j=0,long k=0) {   a[i+nx*(j+ny*k)]=val;   }
#else
    /// Get the value in given cell of the data with border checking
    mreal v(long i,long j=0,long k=0) const {   return mgl_abs(mgl_datac_get_value(this,i,j,k));    }
    /// Set the value in given cell of the data
    void set_v(mreal val, long i,long j=0,long k=0) {   mgl_datac_set_value(this,val,i,j,k);    }
#endif

maybe it should use that instead:

    inline mglData Abs() const
    {   return mglData(true,mgl_datac_abs(this));   }

Try replacing mgl_abs with mgl_datac_abs and report the error upstream

All 3 comments

Error:
C:\Dev\BasicTools\vcpkg\buildtrees\mathgl\src\2.4.3-ea7ba2a6a4\include\mgl2/datac.h(477): error C3861: 'mgl_abs': identifier not found

I did a search through all files in the source tree and this the only place it is used in the source code. The function is not defined anywhere.
Relevant Code:

#ifndef DEBUG
    /// Get the value in given cell of the data
    mreal v(long i,long j=0,long k=0) const {   return abs(a[i+nx*(j+ny*k)]);   }
    /// Set the value in given cell of the data
    void set_v(mreal val, long i,long j=0,long k=0) {   a[i+nx*(j+ny*k)]=val;   }
#else
    /// Get the value in given cell of the data with border checking
    mreal v(long i,long j=0,long k=0) const {   return mgl_abs(mgl_datac_get_value(this,i,j,k));    }
    /// Set the value in given cell of the data
    void set_v(mreal val, long i,long j=0,long k=0) {   mgl_datac_set_value(this,val,i,j,k);    }
#endif

maybe it should use that instead:

    inline mglData Abs() const
    {   return mglData(true,mgl_datac_abs(this));   }

Try replacing mgl_abs with mgl_datac_abs and report the error upstream

After searching for mgl_abs, I found that this function was removed in a certain version, and we should report this to the official.
See history.

According to the history mgl_abs should be simply replaced by abs like in the debug case.

Hi @spindensity, thanks for reporting this issue.
I've fixed this issue in #8369, please update vcpkg and rebuild mathgl.

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cjvaijo picture cjvaijo  路  3Comments

medilies picture medilies  路  3Comments

grandprixgp picture grandprixgp  路  3Comments

LilyWangL picture LilyWangL  路  3Comments

angelmixu picture angelmixu  路  3Comments