Unable to setup pg_repack in ubuntu22.04.1 LTS - postgresql

I want to perform pg_repack in remote postgres server. pg_repack is used to remove bloat from PostgreSQL.
I am following this for reference: https://reorg.github.io/pg_repack/#installation
After installing pgxn, we need to install pg_repack. It's done by
sudo pgxn install pg_repack
And it's resulting in this
INFO: best version: pg_repack 1.4.8
INFO: saving /tmp/tmp3dyb4e3e/pg_repack-1.4.8.zip
INFO: unpacking: /tmp/tmp3dyb4e3e/pg_repack-1.4.8.zip
INFO: building extension
gmake[1]: Entering directory '/tmp/tmp3dyb4e3e/pg_repack-1.4.8/bin'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -I/usr/include/postgresql -DREPACK_VERSION=1.4.8 -I. -I./ -I/usr/include/postgresql/14/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_repack.o pg_repack.c
gmake[1]: gcc: No such file or directory
gmake[1]: *** [<builtin>: pg_repack.o] Error 127
gmake[1]: Leaving directory '/tmp/tmp3dyb4e3e/pg_repack-1.4.8/bin'
gmake: *** [Makefile:35: all] Error 2
ERROR: command returned 2: gmake PG_CONFIG=/usr/bin/pg_config all`
I tried to clone this repo and perform gmake on it directly
gmake PG_CONFIG=/pg_config all
but still I'm getting
gmake: *** No rule to make target 'all'. Stop.

Related

MySQL Workbench for PostgreSQL - ./psqlodbc.h:41:10: fatal error: 'sql.h' file not found

I am trying to connect to a Postgres db trough MySQL Workbench.
Following the documentation we need to install a driver for psql in our machine.
I am running a MacOS Big Sur 11.2.3.
After run CFLAGS="-arch i386 -arch x86_64" make I'm getting the following error:
/Library/Developer/CommandLineTools/usr/bin/make all-am
source='info.c' object='info.lo' libtool=yes \
depfile='.deps/info.Plo' tmpdepfile='.deps/info.TPlo' \
depmode=gcc3 /bin/sh ./depcomp \
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c -o info.lo `test -f 'info.c' || echo './'`info.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c info.c -MT info.lo -MD -MP -MF .deps/info.TPlo -fno-common -DPIC -o info.lo
In file included from info.c:19:
./psqlodbc.h:41:10: fatal error: 'sql.h' file not found
#include <sql.h>
^~~~~~~
1 error generated.
make[1]: *** [info.lo] Error 1
make: *** [all] Error 2
It seems that the 'sql.h' file is not found.
How to solve this issue?

could not open extension control file "/usr/share/pgsql/extension/uuid-ossp.control": No such file or directory

We've a web application build in play framework which uses Postgres 9.6. It works fine. However, we're trying to install Postgres 13, so our application use Postgres 13, instead of Postgres 9.6. This is Amazon Linux 2 (EC2) machine running Linux.
cat /proc/version
Linux version 4.14.252-195.483.amzn2.x86_64 (mockbuild#ip-1-0-1-1) (gcc version 7.3.1 20180712 (Red Hat 7.3.1-13) (GCC))
I've installed Postgres 13 via amazon-linux-extras:
postgresql.x86_64 13.3-2.amzn2.0.1 #amzn2extra-postgresql13
This machine already have Postgres 9.6.
Some other packages installed on the machine are:
# yum list installed | grep -i postgre
libpq.x86_64 13.3-1.amzn2 #amzn2extra-postgresql13
libpq-devel.x86_64 13.3-1.amzn2 #amzn2extra-postgresql13
postgresql.x86_64 13.3-2.amzn2.0.1 #amzn2extra-postgresql13
postgresql-contrib.x86_64 13.3-2.amzn2.0.1 #amzn2extra-postgresql13
postgresql-server.x86_64 13.3-2.amzn2.0.1 #amzn2extra-postgresql13
postgresql-server-devel.x86_64 13.3-2.amzn2.0.1 #amzn2extra-postgresql13
postgresql96.x86_64 9.6.24-1PGDG.rhel6 #pgdg96
postgresql96-devel.x86_64 9.6.24-1PGDG.rhel6 #pgdg96
postgresql96-libs.x86_64 9.6.24-1PGDG.rhel6 #pgdg96
postgresql96-server.x86_64 9.6.24-1PGDG.rhel6 #pgdg96
Note: I removed postgresql96-contrib.x86_64 to fix the error but that dosen't help!
While launching web applictaion, below error is coming:
[ERROR] - from play.api.db.evolutions.DefaultEvolutionsApi in main - ERROR: could not open extension control file "/usr/share/pgsql/extension/uuid-ossp.control": No such file or directory [ERROR:0, SQLSTATE:58P01]
The file does exist:
# ll /usr/share/pgsql/extension/uuid-ossp.control
-rw-r--r-- 1 root root 178 Jun 21 2021 /usr/share/pgsql/extension/uuid-ossp.control
# ll /usr/lib64/pgsql/uuid-ossp.so
-rwxr-xr-x 1 root root 11272 Jun 21 2021 /usr/lib64/pgsql/uuid-ossp.so
bash-4.2$ psql
psql (13.3)
Type "help" for help.
postgres=# CREATE EXTENSION "uuid-ossp";
CREATE EXTENSION
postgres=# select uuid_generate_v1();
uuid_generate_v1
--------------------------------------
49634f70-6329-11ec-87cf-020c60b9374c
(1 row)
# pg_config
BINDIR = /usr/bin
DOCDIR = /usr/share/doc/pgsql
HTMLDIR = /usr/share/doc/pgsql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/pgsql
INCLUDEDIR-SERVER = /usr/include/pgsql/server
LIBDIR = /usr/lib64
PKGLIBDIR = /usr/lib64/pgsql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/man
SHAREDIR = /usr/share/pgsql
SYSCONFDIR = /etc
PGXS = /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--build=x86_64-koji-linux-gnu' '--host=x86_64-koji-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-rpath' '--with-ldap' '--with-openssl' '--with-gssapi' '--enable-nls' '--without-readline' '--datadir=/usr/share/pgsql' 'build_alias=x86_64-koji-linux-gnu' 'host_alias=x86_64-koji-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64-mtune=generic' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
CC = gcc
CPPFLAGS = -D_GNU_SOURCE
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
CFLAGS_SL = -fPIC
LDFLAGS = -Wl,-z,relro -Wl,--as-needed
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lpthread -lssl -lcrypto -lgssapi_krb5 -lz -lrt -ldl -lm
VERSION = PostgreSQL 13.3
I've tried adding /usr/lib64/pgsql in /etc/ld.so.conf.d and running ldconfig but that dosen't help. I tried after restarting Postgres 13.
I’m all out of ideas. What am I missing?
I tried installing via PGDG repo, but got the same error. However, dropping play_evolutions table has resolved this error finally. I see this table was having the error and the corresponding plv8 creation query. I'm not 100% sure why dropping this table has resolved the error. But I think play framework was picking something from cache using this table due to which the error was repeating. I also think this error was more related to play framework than Postgres.

Issue with install Spacy

Runing the command in the instruction:
pip install -U spacy
It fails to build wheel for Building wheels for collected packages: spacy, murmurhash, cymem, preshed, thinc, ujson, regex, cytoolz
This is the error shown on the terminal.
Running setup.py bdist_wheel for spacy ... error
Complete output from command /usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-install-9ygkdvbw/spacy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-wheel-swjw2gll --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.13-x86_64-3.6
creating build/lib.macosx-10.13-x86_64-3.6/spacy
copying spacy/lemmatizer.py -> build/lib.macosx-10.13-x86_64-3.6/spacy
copying spacy/compat.py -> build/lib.macosx-10.13-x86_64-3.6/spacy
...
...
copying spacy/tests/tokenizer/sun.txt -> build/lib.macosx-10.13-x86_64-3.6/spacy/tests/tokenizer
running build_ext
building 'spacy.parts_of_speech' extension
creating build/temp.macosx-10.13-x86_64-3.6
creating build/temp.macosx-10.13-x86_64-3.6/spacy
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes /usr/local/opt/openssl/include -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -I/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-install-9ygkdvbw/spacy/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c spacy/parts_of_speech.cpp -o build/temp.macosx-10.13-x86_64-3.6/spacy/parts_of_speech.o -O2 -Wno-strict-prototypes -Wno-unused-function
clang: warning: /usr/local/opt/openssl/include: 'linker' input unused [-Wunused-command-line-argument]
clang++ -bundle -undefined dynamic_lookup /usr/local/opt/openssl/lib /usr/local/opt/openssl/include build/temp.macosx-10.13-x86_64-3.6/spacy/parts_of_speech.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -o build/lib.macosx-10.13-x86_64-3.6/spacy/parts_of_speech.cpython-36m-darwin.so -Wl,-rpath,#loader_path/../spacy/platform/darwin/lib
ld: can't map file, errno=22 file '/usr/local/opt/openssl/include' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang++' failed with exit status 1
----------------------------------------
Failed building wheel for spacy
Running setup.py clean for spacy
Running setup.py bdist_wheel for murmurhash ... error
Complete output from command /usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-install-9ygkdvbw/murmurhash/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-wheel-9ytvwkua --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.13-x86_64-3.6
creating build/lib.macosx-10.13-x86_64-3.6/murmurhash
copying murmurhash/__init__.py -> build/lib.macosx-10.13-x86_64-3.6/murmurhash
copying murmurhash/about.py -> build/lib.macosx-10.13-x86_64-3.6/murmurhash
creating build/lib.macosx-10.13-x86_64-3.6/murmurhash/tests
copying murmurhash/tests/__init__.py -> build/lib.macosx-10.13-x86_64-3.6/murmurhash/tests
copying murmurhash/tests/test_import.py -> build/lib.macosx-10.13-x86_64-3.6/murmurhash/tests
copying murmurhash/mrmr.pyx -> build/lib.macosx-10.13-x86_64-3.6/murmurhash
copying murmurhash/__init__.pxd -> build/lib.macosx-10.13-x86_64-3.6/murmurhash
copying murmurhash/mrmr.pxd -> build/lib.macosx-10.13-x86_64-3.6/murmurhash
creating build/lib.macosx-10.13-x86_64-3.6/murmurhash/include
creating build/lib.macosx-10.13-x86_64-3.6/murmurhash/include/murmurhash
copying murmurhash/include/murmurhash/MurmurHash2.h -> build/lib.macosx-10.13-x86_64-3.6/murmurhash/include/murmurhash
copying murmurhash/include/murmurhash/MurmurHash3.h -> build/lib.macosx-10.13-x86_64-3.6/murmurhash/include/murmurhash
running build_ext
building 'murmurhash.mrmr' extension
creating build/temp.macosx-10.13-x86_64-3.6
creating build/temp.macosx-10.13-x86_64-3.6/murmurhash
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes /usr/local/opt/openssl/include -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -I/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-install-9ygkdvbw/murmurhash/murmurhash/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c murmurhash/mrmr.cpp -o build/temp.macosx-10.13-x86_64-3.6/murmurhash/mrmr.o -O3 -Wno-strict-prototypes -Wno-unused-function
clang: warning: /usr/local/opt/openssl/include: 'linker' input unused [-Wunused-command-line-argument]
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes /usr/local/opt/openssl/include -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -I/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-install-9ygkdvbw/murmurhash/murmurhash/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c murmurhash/MurmurHash2.cpp -o build/temp.macosx-10.13-x86_64-3.6/murmurhash/MurmurHash2.o -O3 -Wno-strict-prototypes -Wno-unused-function
clang: warning: /usr/local/opt/openssl/include: 'linker' input unused [-Wunused-command-line-argument]
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes /usr/local/opt/openssl/include -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -I/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-install-9ygkdvbw/murmurhash/murmurhash/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c murmurhash/MurmurHash3.cpp -o build/temp.macosx-10.13-x86_64-3.6/murmurhash/MurmurHash3.o -O3 -Wno-strict-prototypes -Wno-unused-function
clang: warning: /usr/local/opt/openssl/include: 'linker' input unused [-Wunused-command-line-argument]
clang++ -bundle -undefined dynamic_lookup /usr/local/opt/openssl/lib /usr/local/opt/openssl/include build/temp.macosx-10.13-x86_64-3.6/murmurhash/mrmr.o build/temp.macosx-10.13-x86_64-3.6/murmurhash/MurmurHash2.o build/temp.macosx-10.13-x86_64-3.6/murmurhash/MurmurHash3.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -o build/lib.macosx-10.13-x86_64-3.6/murmurhash/mrmr.cpython-36m-darwin.so
ld: can't map file, errno=22 file '/usr/local/opt/openssl/lib' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang++' failed with exit status 1
----------------------------------------
Failed building wheel for murmurhash
Running setup.py clean for murmurhash
Similar error for the rest of the libraries.
It probably has something to do with finding python header files. And I checked the location using this command :
python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"
/usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/include/python3.6m
It has all the header files.
This answer (Failed building wheel for spacy) suggests installing the wheel individually. How do I do that on Mac OS X?
The best way to download Spacy and work with it is to download it manually and link it. Below command is used to download it and link it to your python libraries:
Command to download it:
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz
Link that will explain more: https://spacy.io/usage/models#usage-link

how to build pipeline_kafka extension

i'm currently trying to compile the pipeline_kafka extension from Github to add it to my pipelinedb instance but i'm running in a problem neither i nor google seems to be able to solve.
when i execute make command i get the following error
stc#vm:~/pipeline_kafka$ make gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o pipeline_kafka.o pipeline_kafka.c pipeline_kafka.c:23:40: fatal error: catalog/pipeline_stream_fn.h: No such file or directory #include "catalog/pipeline_stream_fn.h" ^ compilation terminated. : recipe for target 'pipeline_kafka.o' failed make: *** [pipeline_kafka.o] Error 1
does anyone has an idea what to do? I'm running on debian 8.
Does anyone know why this extension is not part of pipelinedb anymore?
cheers and thanks in advance
the reason for the error is my entire approach towards using/installing pipelinedb and pipeline_kafka.
the following script worked for me on a standard Debian 8 installation. Maybe it helps.
Download and install PipelineDB
wget -O pipelinedb_install_package "https://www.pipelinedb.com/download/0.9.1/debian8"
sudo dpkg -i pipelinedb_install_package
mkdir ~/logs
pipeline-init -D ~/data/pipelinedb
pipeline-ctl -D ~/data/pipelinedb -l ~/logs/pipelinedb.log start
sleep 5.0
pipeline pipeline
Download and install pipeline_kafka extension
sudo apt-get install git gcc g++ zlib1g-dev
mkdir ~/git
git clone https://github.com/edenhill/librdkafka.git ~/git/librdkafka
git clone https://github.com/pipelinedb/pipeline_kafka.git >~/git/pipeline_kafka
cd ~/git/librdkafka
./configure --prefix=/usr
make
sudo make install
cd ~/git/pipeline_kafka
./configure
make
sudo make install
pipeline pipeline -c "CREATE EXTENSION pipeline_kafka;"
sed -i 's/#shared_preload_libraries/shared_preload_libraries/' ~/data/pipelinedb/pipelinedb.conf
sed -i "s/shared_preload_libraries = ''/shared_preload_libraries=pipeline_kafka/" ~/data/pipelinedb/pipelinedb.conf

Installing Perl/Tk on fedora

I am having trouble trying to install perl Tk on my system(fedora,perl v5.8.8).I downloaded the tarred module from http://search.cpan.org/~srezic/Tk-804.029/pod/gencmd, untarred it.In the terminal,I gave "perl Makefile.PL" which worked fine and then "make" which could not complete.Here is what it gave:
"make[1]: Entering directory `/work/harikal/Tk-804.029/pTk'
gcc -c -I.. -I. -Ibitmaps -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERSION=\"804.029\" -DXS_VERSION=\"804.029\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE" -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__ tkImgPhoto.c
tkImgPhoto.c: In function ‘AllocateColors’:
tkImgPhoto.c:3584: warning: implicit declaration of function ‘sazeof’
tkImgPhoto.c:3584: error: expected expression before ‘XColor’
make[1]: *** [tkImgPhoto.o] Error 1
make[1]: Leaving directory `/work/harikal/Tk-804.029/pTk'
make: *** [pTk/libpTk.a] Error 2"
and then it exits. What am I supposed to do??
Please Help
Thanks.
If you're using the system-installed Perl, then why not use the Fedora project's pre-built package for the module.
$ sudo yum install perl-Tk
I looked at http://cpansearch.perl.org/src/SREZIC/Tk-804.029/pTk/mTk/generic/tkImgPhoto.c - line 3584 and here says "sizeof" not "sazeof". Doublecheck your source/download.