Bug 254139 - devel/php74-sysvsem does'nt compile on PPC64
Summary: devel/php74-sysvsem does'nt compile on PPC64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-08 18:17 UTC by Luciano Mannucci
Modified: 2021-03-12 13:02 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (tz)


Attachments
build log (26.32 KB, text/plain)
2021-03-11 20:32 UTC, Piotr Kubaj
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luciano Mannucci 2021-03-08 18:17:41 UTC
It doesn't compile. I'm getting:

gcc10 -I. -I/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem -DPHP_ATOM_INC -I/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/include -I/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/main -I/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-strict-aliasing -O0 -c /usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/sysvsem.c  -fPIC -DPIC -o .libs/sysvsem.o
In file included from /usr/local/include/php/ext/php_config.h:2,
                 from /usr/local/include/php/main/../main/php_config.h:2381,
                 from /usr/local/include/php/Zend/zend_config.h:1,
                 from /usr/local/include/php/Zend/zend_portability.h:43,
                 from /usr/local/include/php/Zend/zend_types.h:25,
                 from /usr/local/include/php/Zend/zend.h:27,
                 from /usr/local/include/php/main/php.h:33,
                 from /usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/sysvsem.c:32:
/usr/local/include/php/ext/sysvsem/config.h:5: warning: "HAVE_SEMUN" redefined
    5 | #define HAVE_SEMUN 1
      | 
In file included from /usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/sysvsem.c:29:
/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/config.h:17: note: this is the location of the previous definition
   17 | #define HAVE_SEMUN 0
      | 
/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/sysvsem.c: In function 'zif_sem_get':
/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/sysvsem.c:266:15: error: storage size of 'semarg' isn't known
  266 |   union semun semarg;
      |               ^~~~~~
/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/sysvsem.c: In function 'zif_sem_remove':
/usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem/sysvsem.c:382:14: error: storage size of 'un' isn't known
  382 |  union semun un;
      |              ^~
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/php74-sysvsem/work/php-7.4.16/ext/sysvsem
*** Error code 1

Stop.
Comment 1 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2021-03-09 16:25:41 UTC
To be clear: i really have no idea how to fix it. PPC support is way out of my competence. Best I can do is to mark it IGNORE for this platform :D

There are a handful of committer who can fix this. Same for upstream.
Comment 3 Luciano Mannucci 2021-03-11 16:13:45 UTC
(In reply to Piotr Kubaj from comment #2)
7.4.15 versions builds. It's the 7.4.16 tha doesn't.
Comment 4 Brandon Bergren freebsd_committer freebsd_triage 2021-03-11 18:54:23 UTC
It looks like a previously installed PHP's configuration is leaking into the include path there. (note how it's pulling in /usr/local/include/php/ext/sysvsem/config.h)

This is probably an isolation issue when building that isn't reproducable in poudriere.
Comment 5 Brandon Bergren freebsd_committer freebsd_triage 2021-03-11 18:59:09 UTC
BTW, workaround for this issue probably boils down to "Deinstall the old devel/php74-sysvsem before building the new one."
Comment 6 Piotr Kubaj freebsd_committer freebsd_triage 2021-03-11 20:32:39 UTC
Created attachment 223186 [details]
build log

Here's a successful build log of 7.4.16 on 12.2-RELEASE.
Comment 7 Luciano Mannucci 2021-03-11 20:54:56 UTC
(In reply to Brandon Bergren from comment #5)
Yessss!
Workaround "deinstall first" worked!

Thanks,

Luciano.
Comment 8 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2021-03-12 13:02:07 UTC
Great! Thanks to all for your help! :)