Skip to content

1.5.0 build error on RHEL 7 #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devrimgunduz opened this issue Sep 24, 2018 · 10 comments
Closed

1.5.0 build error on RHEL 7 #177

devrimgunduz opened this issue Sep 24, 2018 · 10 comments

Comments

@devrimgunduz
Copy link

Hi,

Getting this on RHEL 7:

  • /usr/bin/make USE_PGXS=1 -j3
    src/partition_filter.c: In function 'select_partition_for_insert':
    src/partition_filter.c:532:9: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
    parts = find_partitions_for_value(value, prel->ev_type, prel, &nparts);
    ^
    src/pg_pathman.c: In function 'append_child_relation':
    src/pg_pathman.c:539:6: error: 'PlannerInfo' has no member named 'append_rel_array'
    root->append_rel_array[child_rti] = appinfo;
    ^
    make[1]: *** [src/pg_pathman.o] Error 1

Regards,

@ildus
Copy link
Collaborator

ildus commented Sep 24, 2018

Hi, could you provide PostgreSQL version?

@devrimgunduz
Copy link
Author

Hi,

I can see this for PostgreSQL between 9.4 and 10.

@ildus
Copy link
Collaborator

ildus commented Sep 25, 2018

We have tested on latest stable versions of postgres, could you provide exact version?

@devrimgunduz
Copy link
Author

Hi,

Please note that I don't think this is not PostgreSQL version related -- more likely a GCC issue. I can compile 1.5.0 on my Fedora box, for example.

This is GCC 4.8.5.

Cheers, Devrim

@ildus
Copy link
Collaborator

ildus commented Sep 25, 2018

Hi, this error occurs on PostgreSQL 11 beta1 and beta2, so I recommend to switch to stable version (or at least beta3). We can't fix it because internal version in Postgres is same for all these releases.

@devrimgunduz
Copy link
Author

Hi,

Not sure how I can be clearer, but:

`+ cd pg_pathman-1.5.0

  • /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
  • echo 'Patch #0 (pg_pathman-pg10-makefile-pgxs.patch):'
  • /usr/bin/cat /var/lib/pgsql/git/pgrpms/rpm/redhat/10/pg_pathman/EL-7/pg_pathman-pg10-makefile-pgxs.patch
  • /usr/bin/patch -p0 --fuzz=0
  • exit 0
  • umask 022
  • cd /var/lib/pgsql/rpm10testing/BUILD
  • cd pg_pathman-1.5.0
  • /usr/bin/make USE_PGXS=1 -j3
    src/partition_filter.c: In function 'select_partition_for_insert':
    src/partition_filter.c:532:9: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
    parts = find_partitions_for_value(value, prel->ev_type, prel, &nparts);
    ^
    src/partition_overseer.c: In function 'set_mt_state_for_router':
    src/partition_overseer.c:76:2: error: 'for' loop initial declarations are only allowed in C99 mode
    for (int i = 0; i < mt_state->mt_nplans; i++)
    ^
    src/partition_overseer.c:76:2: note: use option -std=c99 or -std=gnu99 to compile your code
    `

This is PostgreSQL 10. As I stated above, this only occurs on older GCCs.

Regards, Devrim

@ildus
Copy link
Collaborator

ildus commented Sep 25, 2018

Hi, I pushed fix for this compilation error to master branch

@ildus
Copy link
Collaborator

ildus commented Sep 25, 2018

Please notice that first error was related with 'append_rel_array`, and only the second was related with gcc, so the first error still be there for pg11 beta1 and beta2.

@devrimgunduz
Copy link
Author

@ildus , any plans for 1.5.1? I need to release community RPMS ASAP.

@ildus
Copy link
Collaborator

ildus commented Sep 25, 2018

I have released version 1.5.1

@ildus ildus closed this as completed Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants