dk / PDL-Drawing-Prima

Low-level PDL-threaded interface to the Prima drawing commands.
5 stars 4 forks source link

Error of compilling with PDL-2.033 #35

Closed YuryPakhomov closed 2 years ago

YuryPakhomov commented 3 years ago
Building PDL-Drawing-Prima cc -I/usr/local/lib64/perl5/PDL/Core -I/usr/local/lib64/perl5/Prima/../Prima/CORE -I/usr/local/lib64/perl5/Prima/../Prima/CORE/generic -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/lib64/perl5/CORE -DVERSION="0.12_01" -DXS_VERSION="0.12_01" -fPIC -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -fPIC -o lib/PDL/Drawing/Prima/Utils.o lib/PDL/Drawing/Prima/Utils.c /usr/local/lib64/perl5/PDL/PP/PDLCode.pm: In function 'pdl_hsv_to_rgb_readdata': /usr/local/lib64/perl5/PDL/PP/PDLCode.pm:427:10: error: invalid operands to binary > (have 'PDL_CFloat' {aka '_Complex float'} and 'int') 427 # to determine whether to define/undefine the THISISxxx macros ^ /usr/local/lib64/perl5/PDL/PP/PDLCode.pm:428:10: error: invalid operands to binary < (have 'PDL_CFloat' {aka '_Complex float'} and 'int') 428 # (makes the xs code easier to read) ^ /usr/local/lib64/perl5/PDL/PP/PDLCode.pm:434:10: error: invalid operands to binary > (have 'PDL_CFloat' {aka '_Complex float'} and 'int') 434 use PDL::Types ':All'; ^ /usr/local/lib64/perl5/PDL/PP/PDLCode.pm:435:10: error: invalid operands to binary < (have 'PDL_CFloat' {aka '_Complex float'} and 'int') 435 my @typetable = map [$->ppsym, $], types(); ^ /usr/local/lib64/perl5/PDL/PP/PDLCode.pm:446:11: error: invalid operands to binary < (have 'PDL_CFloat' {aka '_Complex float'} and 'int') 446 } ^ /usr/local/lib64/perl5/PDL/PP/PDLCode.pm:447:11: error: invalid operands to binary > (have 'PDL_CFloat' {aka '_Complex float'} and 'int') 447 ....... ....... /usr/local/lib64/perl5/PDL/PP/PDLCode.pm:585:105: error: invalid operands to binary < (have 'PDL_CDouble' {aka '_Complex double'} and 'PDL_CDouble' {aka '_Complex double'}) 585 '} while(PDL->iterthreadloop(&$PRIV(__pdlthread),2));'."\n", ^
PDL_CDouble {aka _Complex double}
/usr/local/lib64/perl5/PDL/PP/PDLCode.pm:592:105: error: invalid operands to binary > (have 'PDL_CDouble' {aka '_Complex double'} and 'PDL_CDouble' {aka '_Complex double'}) 592 # ^
PDL_CDouble {aka _Complex double}

/usr/local/lib64/perl5/PDL/PP/PdlParObj.pm: In function 'pdl_trim_collated_min_readdata': /usr/local/lib64/perl5/PDL/PP/PdlParObj.pm:440:143: error: invalid operands to binary < (have 'PDL_CFloat' {aka '_Complex float'} and 'PDL_CFloat' {aka '_Complex float'}) /usr/local/lib64/perl5/PDL/PP/PdlParObj.pm:440:143: error: invalid operands to binary < (have 'PDL_CDouble' {aka '_Complex double'} and 'PDL_CDouble' {aka '_Complex double'}) /usr/local/lib64/perl5/PDL/PP/PdlParObj.pm: In function 'pdl_trim_collated_max_readdata': /usr/local/lib64/perl5/PDL/PP/PdlParObj.pm:440:143: error: invalid operands to binary > (have 'PDL_CFloat' {aka '_Complex float'} and 'PDL_CFloat' {aka '_Complex float'}) /usr/local/lib64/perl5/PDL/PP/PdlParObj.pm:440:143: error: invalid operands to binary > (have 'PDL_CDouble' {aka '_Complex double'} and 'PDL_CDouble' {aka '_Complex double'}) error building lib/PDL/Drawing/Prima/Utils.o from 'lib/PDL/Drawing/Prima/Utils.c' at /usr/share/perl5/ExtUtils/CBuilder/Base.pm line 185.

YuryPakhomov commented 3 years ago

I compile on Slackware64-current with lastest libraries: gcc-10.2.0_multilib-x86_64-4alien glibc-2.33_multilib-x86_64-1alien perl-pdl-2.033-x86_64-1PDL/PP/PDLCode.pm

I found that line numeration is changed in new PDL version. PDL/PP/PdlParObj.pm, PDL/PP/PDLCode.pm and others. PDL/Drawing/Prima/Utils.c should be changed too.

mohawk2 commented 3 years ago

This was fixed in PDL 2.037.

run4flat commented 2 years ago

As mentioned by @mohawk2, this arose from a change in PDL itself. PDL was later changed so that this is no longer a bug. As of PDL v2.072 and PDL::Drawing::Prima v0.13, everything compiles fine. Thanks for reporting the issue, and I apologize for not responding more promptly!