[MDEV-13932] fil0pagecompress.cc fails to compile with lzo 2.10 Created: 2017-09-28  Updated: 2017-09-29  Resolved: 2017-09-29

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB
Affects Version/s: 10.1
Fix Version/s: 10.1.29

Type: Bug Priority: Major
Reporter: Jan Lindström (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File fil0pagecompress.cc_lzo_fix1a.patch    

 Description   

lzo2.10 :

 
storage/innobase/CMakeFiles/innobase.dir/fil/fil0pagecompress.cc.o
cd /usr/src/mariadb/build-10.2.8/storage/innobase && /usr/bin/c++   -DBTR_CUR_ADAPT -DBTR_CUR_HASH_ADAPT -DCOMPILER_HINTS -DHAVE_BZIP2=1 -DHAVE_CONFIG_H -DHAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE=1 -DHAVE_IB_LINUX_FUTEX=1 -DHAVE_LZO=1 -DHAVE_NANOSLEEP=1 -DHAVE_SCHED_GETCPU=1 -DLINUX_NATIVE_AIO=1 -DMUTEX_EVENT -D_FILE_OFFSET_BITS=64 -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -O2 -g -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -I/usr/src/mariadb/build-10.2.8/include -I/usr/src/mariadb/10.2.8/storage/innobase/include -I/usr/src/mariadb/10.2.8/storage/innobase/handler -I/usr/src/mariadb/10.2.8/libbinlogevents/include -I/usr/src/mariadb/10.2.8/include -I/usr/src/mariadb/10.2.8/sql -I/usr/local/openssl/1.0.2h/include    -DUNIV_LINUX -D_GNU_SOURCE=1  -fvisibility=hidden -o CMakeFiles/innobase.dir/fil/fil0pagecompress.cc.o -c /usr/src/mariadb/10.2.8/storage/innobase/fil/fil0pagecompress.cc
/usr/src/mariadb/10.2.8/storage/innobase/fil/fil0pagecompress.cc: In function ‘byte* fil_compress_page(fil_space_t*, byte*, byte*, ulint, ulint, ulint, bool, ulint*)’:
/usr/src/mariadb/10.2.8/storage/innobase/fil/fil0pagecompress.cc:185:69: error: invalid conversion from ‘ulint* {aka unsigned int*}’ to ‘lzo_uint* {aka long unsigned int*}’ [-fpermissive]
/usr/include/lzo/lzo1x.h:105:1: error:   initializing argument 4 of ‘int lzo1x_1_15_compress(const unsigned char*, lzo_uint, unsigned char*, lzo_uint*, void*)’ [-fpermissive]
/usr/src/mariadb/10.2.8/storage/innobase/fil/fil0pagecompress.cc: In function ‘void fil_decompress_page(byte*, byte*, ulong, ulint*, bool)’:
/usr/src/mariadb/10.2.8/storage/innobase/fil/fil0pagecompress.cc:526:52: error: invalid conversion from ‘ulint* {aka unsigned int*}’ to ‘lzo_uint* {aka long unsigned int*}’ [-fpermissive]
/usr/include/lzo/lzo1x.h:56:1: error:   initializing argument 4 of ‘int lzo1x_decompress(const unsigned char*, lzo_uint, unsigned char*, lzo_uint*, void*)’ [-fpermissive]



 Comments   
Comment by Gordon Fisher [ 2017-09-28 ]

I am submitting a simple patch for this issue that I had ran into yesterday.

Comment by Gordon Fisher [ 2017-09-29 ]

Here is a better patch at the recommendation of dragonheart on freenode/#maria

fil0pagecompress.cc_lzo_fix1a.patch

Comment by Jan Lindström (Inactive) [ 2017-09-29 ]

Similar to other open source projects, the MariaDB Foundation needs to have shared ownership of all code that is included in the MariaDB distribution. The easiest way to achieve this is by submitting your code under the BSD-new license. The other alternative is to sign the code contribution agreement which can be found here: https://mariadb.com/kb/en/mariadb/mca/

Please indicate in a comment below that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it.

Thanks,
Jan

Comment by Gordon Fisher [ 2017-09-29 ]

Jan, you and the mariadb project are perfectly free to do with any patch that I submit as you see fit. You, mariadb, and any contributors have my full expressed permission to use them.

Comment by Jan Lindström (Inactive) [ 2017-09-29 ]

commit b8488e5cf56cece22ae324a652d7ce8042739971
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Fri Sep 29 14:12:38 2017 +0300

MDEV-13932: fil0pagecompress.cc fails to compile with lzo 2.10

Patch contibuted by Gordon Fisher. Thank you for your contribution!

Generated at Thu Feb 08 08:09:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.