| Summary: | Can't (re)compile portgresql on mips ip32 | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Stuart Shelton <srcshelton> |
| Component: | Current packages | Assignee: | PgSQL Bugs <pgsql-bugs> |
| Status: | RESOLVED TEST-REQUEST | ||
| Severity: | normal | CC: | mips, nigoro |
| Priority: | High | ||
| Version: | 2005.0 | ||
| Hardware: | MIPS | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
patch for postgresql-7.4.7-r1.ebuild
regression.out regression.diffs safer patch for postgresql-7.4.7-r2.ebuild |
||
|
Description
Stuart Shelton
2005-04-08 06:08:06 UTC
Please emerge with CFLAGS="-O2" and tell me results. Please report your /usr/tmp/portage/postgresql-7.4.7-r1/work/postgresql-7.4.7/src/include/pg_config.h Hi Stuart, nigoro who has the same kind of machine as yours has told me that it works with not -O[2-9] but -O1. Can you try compiling it with -O1 flag? Then, I'll add replace_flag function to postgresql ebuilds after your test. This problem seems to be related to gcc-3.4.x. When it compiled using gcc-3.3.2, it has compiled normally. Created attachment 55995 [details, diff]
patch for postgresql-7.4.7-r1.ebuild
This patch is for gcc-3.4.x.
The problem which cannot be compiled, and it which initdb doesn't work are
solved by applying the patch.
* "-fno-unit-at-a-time" is required in order to make compile successful.
* And "-fno-merge-constants" is required in order to work normally.
Stuart, Would you try this patch and tell me results ?
FYI, the following is the result of initdb when compiling without
"-fno-merge-constants".
# su postgres -c "/usr/bin/initdb --pgdata /tmp/hoge"
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale C.
creating directory /tmp/hoge... ok
creating directory /tmp/hoge/base... ok
creating directory /tmp/hoge/global... ok
creating directory /tmp/hoge/pg_xlog... ok
creating directory /tmp/hoge/pg_clog... ok
selecting default max_connections... /usr/bin/initdb: line 572: 30037
Segmentation fault "$PGPATH"/postgres -boot -x0 $TEST_OPT template1
</dev/null >/dev/null 2>&1
/usr/bin/initdb: line 572: 30039 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 572: 30041 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 572: 30043 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 572: 30045 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 572: 30047 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
10
selecting default shared_buffers... /usr/bin/initdb: line 585: 30048
Segmentation fault "$PGPATH"/postgres -boot -x0 $TEST_OPT template1
</dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30049 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30050 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30051 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30052 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30053 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30054 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30055 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30056 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30057 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 585: 30058 Segmentation fault "$PGPATH"/postgres
-boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
50
creating configuration files... ok
creating template1 database in /tmp/hoge/base/1... /usr/bin/initdb: line 644:
30134 Segmentation fault "$PGPATH"/postgres -boot -x1 $PGSQL_OPT
$BOOTSTRAP_TALK_ARG template1
initdb: failed
initdb: removing data directory "/tmp/hoge"
The result of regression test of PostgreSQL. /bin/sh ./pg_regress --schedule=./serial_schedule --multibyte=SQL_ASCII (using postmaster on Unix socket, default port) ============== dropping database "regression" ============== DROP DATABASE ============== creating database "regression" ============== CREATE DATABASE ALTER DATABASE ============== dropping regression test user accounts ============== ============== installing PL/pgSQL ============== ============== running regression test queries ============== <snip> test oidjoins ... ok test type_sanity ... ok test opr_sanity ... ok test geometry ... FAILED test horology ... ok test insert ... ok test create_function_1 ... ok <snip> ======================= 1 of 93 tests failed. ======================= The differences that caused some tests to fail can be viewed in the file `./regression.diffs'. A copy of the test summary that you see above is saved in the file `./regression.out'. make[2]: *** [installcheck] Error 1 rm regress.o make[2]: Leaving directory `/var/tmp/portage/postgresql-7.4.7-r1/work/postgresql-7.4.7/src/test/regress' make[1]: *** [installcheck] Error 2 make[1]: Leaving directory `/var/tmp/portage/postgresql-7.4.7-r1/work/postgresql-7.4.7/src/test' make: *** [installcheck] Error 2 Created attachment 55996 [details]
regression.out
Created attachment 55997 [details]
regression.diffs
MIPS herds, How do you think about these results ? Okay, with the patch everything looks good to me: # ebuild /var/db/pkg/dev-db/postgresql-7.4.7-r1/postgresql-7.4.7-r1.ebuild config * Creating the data directory ... * Initializing the database ... The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. fixing permissions on existing directory /var/lib/postgresql/data... ok creating directory /var/lib/postgresql/data/base... ok creating directory /var/lib/postgresql/data/global... ok creating directory /var/lib/postgresql/data/pg_xlog... ok creating directory /var/lib/postgresql/data/pg_clog... ok selecting default max_connections... 100 selecting default shared_buffers... 1000 creating configuration files... ok creating template1 database in /var/lib/postgresql/data/base/1... ok initializing pg_shadow... ok enabling unlimited row size for system tables... ok initializing pg_depend... ok creating system views... ok loading pg_description... ok creating conversions... ok setting privileges on built-in objects... ok creating information schema... ok vacuuming database template1... ok copying template1 to template0... ok Success. ... but I've not had a chance to give it an in-depth test yet. Those regression test results are *only* for compilations with "-fno-merge-constants", right? Stuart, Thanks for your report! I tested using PostgreSQL compiled after applying my patch. Regression test is possible by the following methods. 1. /etc/init.d/postgresql start 2. cd /usr/portage/dev-db/postgresql 3. ebuild postgresql-7.4.7-r1.ebuild compile 4. cd /var/tmp/portage/postgresql-7.4.7-r1/work 5. Please download postgresql-test-7.4.7.tar.bz2 from following URL. http://www.postgresql.org/ftp/source/v7.4.7/ 6. tar xjpf postgresql-test-7.4.7.tar.bz2 7. chmod -R 777 /var/tmp/portage/postgresql-7.4.7-r1/work 8. cd /var/tmp/portage/postgresql-7.4.7-r1/work/postgresql-7.4.7 9. su postgres 10. make installcheck Thank you. Created attachment 61044 [details, diff]
safer patch for postgresql-7.4.7-r2.ebuild
It makes all optimization disable.
I think that it is safe rather than disable a part of optimization.
MIPS herds, Would you test this patch ? (In reply to comment #13) You cannot do it like that. Use flag filtering functions instead. (In reply to comment #5) > This problem seems to be related to gcc-3.4.x. > When it compiled using gcc-3.3.2, it has compiled normally. Reopen if you can reproduce w/ >=gcc4.1.1-r3; gcc-3.x is not supported any more. Thanks. |