Test CMake build
Hello all.
Please test build Postgres using cmake. If you are of course interested.
Still not everything is ready but most of the work. Assembly instructions
as does the repository is on github:
https://github.com/stalkerg/postgres_cmake
The compilation will be enough (tests even better). I need feedbacks so
that create issues on github.
Very interesting NetBSD, OpenBSD, Solaris.
Thanks!
--
Yury Zhuravlev
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 10 Feb 2016, at 19:09, Yury Zhuravlev <u.zhuravlev@postgrespro.ru> wrote:
Hello all.
Please test build Postgres using cmake. If you are of course interested.
Still not everything is ready but most of the work. Assembly instructions as does the repository is on github:
https://github.com/stalkerg/postgres_cmakeThe compilation will be enough (tests even better). I need feedbacks so that create issues on github.
Very interesting NetBSD, OpenBSD, Solaris.
I was under the impression that the FreeBSD port already uses cmake?
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 2/10/2016 12:09 PM, Yury Zhuravlev wrote:
Hello all.
Please test build Postgres using cmake. If you are of course interested.
Still not everything is ready but most of the work. Assembly
instructions as does the repository is on github:
https://github.com/stalkerg/postgres_cmakeThe compilation will be enough (tests even better). I need feedbacks so
that create issues on github.
Very interesting NetBSD, OpenBSD, Solaris.
Thanks!
Slackware64, 14.1
-- The C compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
etc, etc,
-- Performing Test AC_FUNC_ACCEPT
-- Performing Test AC_FUNC_ACCEPT - Failed
-- Performing Test AC_FUNC_ACCEPT
-- Performing Test AC_FUNC_ACCEPT - Failed
...A TON of the above...
-- Performing Test AC_FUNC_ACCEPT
-- Performing Test AC_FUNC_ACCEPT - Failed
ERRORcould not determine argument types
-- Looking for accept function args - found , , , *
-- Check alignment of double
-- Check alignment of double - 8
-- Check alignment of int
-- Check alignment of int - 4
-- Check alignment of long
-- Check alignment of long - 8
-- Check alignment of long long int
-- Check alignment of long long int - 8
-- Check alignment of short
-- Check alignment of short - 2
-- Check size of int64
-- Check size of int64 - failed
-- Check size of uint64
-- Check size of uint64 - failed
-- Check size of int8
-- Check size of int8 - failed
-- Check size of void *
-- Check size of void * - failed
-- Check size of long int
-- Check size of long int - failed
-- Check size of long
-- Check size of long - failed
-- Check size of size_t
-- Check size of size_t - failed
-- Check size of locale_t
-- Check size of locale_t - failed
-- Check size of long long int
-- Check size of long long int - failed
CMake Error at CMakeLists.txt:262 (message):
Cannot find a working 64-bit integer type.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 2/10/2016 2:45 PM, Andy Colson wrote:
On 2/10/2016 12:09 PM, Yury Zhuravlev wrote:
Hello all.
Please test build Postgres using cmake. If you are of course interested.
Still not everything is ready but most of the work. Assembly
instructions as does the repository is on github:
https://github.com/stalkerg/postgres_cmakeThe compilation will be enough (tests even better). I need feedbacks so
that create issues on github.
Very interesting NetBSD, OpenBSD, Solaris.
Thanks!Slackware64, 14.1
-- The C compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
This might be important:
-- Looking for include file pwd.h
-- Looking for include file pwd.h - found
-- Found Readline: /usr/include
-- Looking for include files stdio.h, readline.h
-- Looking for include files stdio.h, readline.h - not found
-- Looking for include files stdio.h, history.h
-- Looking for include files stdio.h, history.h - not found
-- Looking for include files stdio.h, readline/history.h
-- Looking for include files stdio.h, readline/history.h - found
-- Looking for include files stdio.h, readline/readline.h
-- Looking for include files stdio.h, readline/readline.h - found
-- Looking for include files stdio.h, editline/history.h
-- Looking for include files stdio.h, editline/history.h - not found
-- Looking for include files stdio.h, editline/readline.h
-- Looking for include files stdio.h, editline/readline.h - not found
-- Check size of long long int - failed
CMake Error at CMakeLists.txt:262 (message):
Cannot find a working 64-bit integer type.
the end of CMakeFiles/CMakeError.log shows:
Determining size of long long int failed with the following output:
Change Dir: /home/andy/projects/postgres_cmake/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec301475258/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec301475258.dir/build.make
CMakeFiles/cmTryCompileExec301475258.dir/build
gmake[1]: Entering directory
`/home/andy/projects/postgres_cmake/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/andy/projects/postgres_cmake/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object
CMakeFiles/cmTryCompileExec301475258.dir/HAVE_LONG_LONG_INT_64.c.o
/usr/bin/cc -o
CMakeFiles/cmTryCompileExec301475258.dir/HAVE_LONG_LONG_INT_64.c.o -c
/home/andy/projects/postgres_cmake/build/CMakeFiles/CheckTypeSize/HAVE_LONG_LONG_INT_64.c
Linking C executable cmTryCompileExec301475258
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec301475258.dir/link.txt --verbose=1
/usr/bin/cc
CMakeFiles/cmTryCompileExec301475258.dir/HAVE_LONG_LONG_INT_64.c.o -o
cmTryCompileExec301475258 -rdynamic -lreadline
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `BC'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec301475258] Error 1
gmake[1]: Leaving directory
`/home/andy/projects/postgres_cmake/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec301475258/fast] Error 2
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 2/10/2016 2:50 PM, Andy Colson wrote:
On 2/10/2016 2:45 PM, Andy Colson wrote:
On 2/10/2016 12:09 PM, Yury Zhuravlev wrote:
Hello all.
Please test build Postgres using cmake. If you are of course interested.
Still not everything is ready but most of the work. Assembly
instructions as does the repository is on github:
https://github.com/stalkerg/postgres_cmakeThe compilation will be enough (tests even better). I need feedbacks so
that create issues on github.
Very interesting NetBSD, OpenBSD, Solaris.
Thanks!
Slackware64, 14.1
/usr/lib64/gcc/x86_64-slackware-linux/4.9.2/../../../../lib64/libreadline.so:
undefined reference to `tputs'
tputs is in ncurses?
I did not see a:
-- Looking for curses
And it didnt try to link with it:
/usr/bin/cc
CMakeFiles/cmTryCompileExec301475258.dir/HAVE_LONG_LONG_INT_64.c.o -o
cmTryCompileExec301475258 -rdynamic -lreadline
-Andy
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Alban Hertroys wrote:
I was under the impression that the FreeBSD port already uses cmake?
I tested on a 32-bit FreeBSD. All tests passed.
--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Andy Colson wrote:
the end of CMakeFiles/CMakeError.log shows:
Many thanks! I think I understand what the problem is. I will try to fix
soon.
I write as a corrected.
--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Yury Zhuravlev wrote:
I will try to fix soon.
I write as a corrected.
You can try again. Thanks!
--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 2/11/2016 9:49 AM, Yury Zhuravlev wrote:
Yury Zhuravlev wrote:
I will try to fix soon.
I write as a corrected.You can try again. Thanks!
That seems better:
-- Found Readline: /usr/include
-- Found Curses: /usr/lib64/libcurses.so
Is this bad?
-- Check size of int64
-- Check size of int64 - failed
-- Check size of uint64
-- Check size of uint64 - failed
-- Check size of int8
-- Check size of int8 - failed
make -j2
running now...
-Andy
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 2/11/2016 10:44 AM, Andy Colson wrote:
On 2/11/2016 9:49 AM, Yury Zhuravlev wrote:
Yury Zhuravlev wrote:
I will try to fix soon.
I write as a corrected.You can try again. Thanks!
That seems better:
-- Found Readline: /usr/include
-- Found Curses: /usr/lib64/libcurses.soIs this bad?
-- Check size of int64
-- Check size of int64 - failed
-- Check size of uint64
-- Check size of uint64 - failed
-- Check size of int8
-- Check size of int8 - failedmake -j2
running now...-Andy
make finished ok.
I build slackware packages, so it needs to install into a temp spot,
which kinda works:
andy@mapper:~/projects/postgres_cmake/build$ mkdir /tmp/pg999
I used to use "make install-strip", is that not a thing anymore?
andy@mapper:~/projects/postgres_cmake/build$ make install-strip
DESTDIR=/tmp/pg999
make: *** No rule to make target `install-strip'. Stop.
Ok, we'll install, but into a tmp folder:
andy@mapper:~/projects/postgres_cmake/build$ make install DESTDIR=/tmp/pg999
[ 0%] Built target gen_errorcodes
[ 3%] Built target port
[ 5%] Built target port_srv
<SNIP>
[100%] Built target refint
[100%] Built target timetravel
Install the project...
-- Install configuration: ""
-- Installing: /tmp/pg999/usr/local/pg99/lib/libpq.so
-- Installing: /tmp/pg999/usr/local/pg99/bin/initdb
<Ok .. looks good>
-- Removed runtime path from "/tmp/pg999/usr/local/pg99/bin/initdb"
<Not sure what that means, but ok>
<now we hit a problem>
-- Installing: /tmp/pg999/usr/local/pg99/share/timezonesets/Default
-- Installing: /tmp/pg999/usr/local/pg99/share/timezonesets/Australia
-- Installing: /tmp/pg999/usr/local/pg99/share/timezonesets/India
/home/andy/projects/postgres_cmake/build/src/timezone//zic: Cannot
create directory /usr/local/pg99: Permission denied
-- Installing: /tmp/pg999/usr/local/pg99/lib/plpgsql.so
-- Installing: /tmp/pg999/usr/local/pg99/share/extension/plpgsql.control
-- Installing: /tmp/pg999/usr/local/pg99/share/extension/plpgsql--1.0.sql
-- Installing:
/tmp/pg999/usr/local/pg99/share/extension/plpgsql--unpackaged--1.0.sql
I start with:
cmake .. -DCMAKE_INSTALL_PREFIX="/usr/local/pg99"
I'm not building/installing as root, so cannot actually write to
/usr/local/pg99
I dunno what version we are building, and dont want to replace anything
currently installed, so I went for pg99.
andy@mapper:~/projects/postgres_cmake/build$ make installcheck
Scanning dependencies of target tablespace-setup
[ 0%] Built target tablespace-setup
[ 0%] Built target gen_errorcodes
[ 42%] Built target port
[ 85%] Built target pq
[100%] Built target pgcommon
[100%] Built target pg_regress
Scanning dependencies of target installcheck
============== creating temporary instance ==============
============== initializing database system ==============
pg_regress: initdb failed
Examine
/home/andy/projects/postgres_cmake/src/test/regress/log/initdb.log for
the reason.
Command was: "/usr/local/pg99/bin/initdb" -D
"/home/andy/projects/postgres_cmake/src/test/regress/tmp_check/data"
--noclean --nosync --no-locale >
"/home/andy/projects/postgres_cmake/src/test/regress/log/initdb.log" 2>&1
make[3]: *** [src/test/regress/CMakeFiles/installcheck] Error 2
make[2]: *** [src/test/regress/CMakeFiles/installcheck.dir/all] Error 2
make[1]: *** [src/test/regress/CMakeFiles/installcheck.dir/rule] Error 2
make: *** [installcheck] Error 2
andy@mapper:~/projects/postgres_cmake/build$ cat
/home/andy/projects/postgres_cmake/src/test/regress/log/initdb.log
sh: /usr/local/pg99/bin/initdb: No such file or directory
Yeah, that makes sense, its not actually there yet. Is the installcheck
important to you? I can do the install if you like.
-Andy
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 2/10/2016 12:09 PM, Yury Zhuravlev wrote:
Hello all.
Please test build Postgres using cmake. If you are of course interested.
Still not everything is ready but most of the work. Assembly
instructions as does the repository is on github:
https://github.com/stalkerg/postgres_cmakeThe compilation will be enough (tests even better). I need feedbacks so
that create issues on github.
Very interesting NetBSD, OpenBSD, Solaris.
Thanks!
On a side note, how hard would it be to print a small summary of options
after the cmake step?
Its not important, but is pretty nice. mapserver, for example, shows this:
-- * Summary of configured options for this build
-- * Mandatory components
-- * png: /usr/lib64/libpng.so
-- * jpeg: /usr/lib64/libjpeg.so
-- * freetype: /usr/lib64/libfreetype.so
-- * Optional components
-- * GDAL: /usr/local/lib/libgdal.so
-- * OGR: /usr/local/lib/libgdal.so
-- * GD: disabled
-- * GIF: /usr/lib64/libgif.so
-- * MYSQL: disabled
-- * FRIBIDI: /usr/lib64/libfribidi.so
-- * GIF: /usr/lib64/libgif.so
-- * CAIRO: /usr/lib64/libcairo.so
-- * SVGCAIRO: disabled
-- * RSVG: disabled
-- * CURL: disabled
-- * PROJ: /usr/lib64/libproj.so
-- * LIBXML2: /usr/lib64/libxml2.so
-- * POSTGIS: /usr/local/pg93/lib/libpq.so
-- * GEOS: /usr/lib64/libgeos_c.so
-- * FastCGI: /usr/lib64/libfcgi.so
-- * Oracle Spatial: disabled
-- * SDE: disabled
-- * Exempi XMP: disabled
-- * Optional features
-- * WMS SERVER: ENABLED
-- * WFS SERVER: ENABLED
-- * WCS SERVER: ENABLED
-- * SOS SERVER: disabled
-- * WMS CLIENT: disabled
-- * WFS CLIENT: disabled
-- * ICONV: ENABLED
-- * Thread-safety support: disabled
-- * KML output: disabled
-- * Z+M point coordinate support: disabled
-- * XML Mapfile support: disabled
-- * Mapscripts
-- * Python: disabled
-- * PHP: disabled
-- * PERL: ENABLED
-- * RUBY: disabled
-- * JAVA: disabled
-- * C#: disabled
-- * Apache Module (Experimental): disabled
--
-- Will install files to /usr/local
-- Will install libraries to /usr/local/lib64
We would not care about the libs, but things like integer dates, and
perl, python, etc, ssl version. Looks like you calc TABLE_BLOCKSIZE and
WAL_BLOCKSIZE, those might be nice to see.
Anyway, thanks for all your work on this. Looking good.
-Andy
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Andy Colson wrote:
Is this bad?
-- Check size of int64
-- Check size of int64 - failed
-- Check size of uint64
-- Check size of uint64 - failed
-- Check size of int8
-- Check size of int8 - failed
This is normal behavior for linux.
--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Yury Zhuravlev <u.zhuravlev@postgrespro.ru> writes:
Andy Colson wrote:
Is this bad?
-- Check size of int64
-- Check size of int64 - failed
-- Check size of uint64
-- Check size of uint64 - failed
-- Check size of int8
-- Check size of int8 - failed
This is normal behavior for linux.
Really? That sure seems misleading as can be, and not something we'd
want to be part of a new user's very first impression of Postgres.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I used to use "make install-strip", is that not a thing anymore?
I think it's plans for the near future. Please create issue in GitHub.
/home/andy/projects/postgres_cmake/build/src/timezone//zic: Cannot create
directory /usr/local/pg99: Permission denied
I will fix it.
sh: /usr/local/pg99/bin/initdb: No such file or directory
I have not tested yet with DESTDIR. I think tomorrow will correct it.
Yeah, that makes sense, its not actually there yet. Is the installcheck
important to you? I can do the install if you like.
installcheck is replace "make check" now. Or I did not understand your
question.
--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Tom Lane wrote:
Really? That sure seems misleading as can be, and not something we'd
want to be part of a new user's very first impression of Postgres.
In configure we have similar messages:
checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Yury Zhuravlev <u.zhuravlev@postgrespro.ru> writes:
Tom Lane wrote:
Really? That sure seems misleading as can be, and not something we'd
want to be part of a new user's very first impression of Postgres.
In configure we have similar messages:
checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
Hm, well, configure does not use the word "failed" to describe expected
cases.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On четверг, 11 февраля 2016 г. 22:37:12 MSK, Tom Lane wrote:
Hm, well, configure does not use the word "failed" to describe expected
cases.
Well, it does not confuse CMake users. (MySQL, KDE)
Just the other tradition, I do not see the problem here. :)
--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I tried it on FreeBSD 64-bit, 16Gb, SSD, Core i7
( ./configure && gmake all; ) 168,99s user 15,46s system 97% cpu 3:09,61 total
( cmake . && gmake all; ) 75,11s user 11,34s system 100% cpu 1:26,30 total
Cmake 2 times faster, that is good, but I don't understand why. Which
optimization level does cmake buld use by default? Which compiler does it take?
It's not obvious, because cmake build hides actual compiler command line.
Yury, pls, return back check target...
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Teodor Sigaev wrote:
I tried it on FreeBSD 64-bit, 16Gb, SSD, Core i7
( ./configure && gmake all; ) 168,99s user 15,46s system 97% cpu 3:09,61 total
( cmake . && gmake all; ) 75,11s user 11,34s system 100% cpu 1:26,30 total
( CFLAGS='-O2' cmake . && gmake all; ) 141,87s user 12,18s system 97% cpu
2:37,40 total
Oops, cmake default target is compiled with -O0. With -O2 cmake is still faster
but not so much.
Cmake 2 times faster, that is good, but I don't understand why. Which
optimization level does cmake buld use by default? Which compiler does it take?
It's not obvious, because cmake build hides actual compiler command line.Yury, pls, return back check target...
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Teodor Sigaev wrote:
Cmake 2 times faster, that is good, but I don't understand why. Which
optimization level does cmake buld use by default? Which compiler does it
take? It's not obvious, because cmake build hides actual compiler command
line.
Hm, I don't think having the compile/link lines be hidden up is
acceptable. Many times we need to debug some compile problem, and the
output is mandatory.
--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general