cognitus / php7-mga

source code for build .rpm php7 in mageia 6
1 stars 0 forks source link

compile error #2

Closed waclaw66 closed 7 years ago

waclaw66 commented 7 years ago

Hi! Trying to compile, I got following error...

Build complete.
Don't forget to run 'make test'.

+ cp -af php_config.h.cgi main/php_config.h
+ make -f Makefile.cgi sapi/cgi/php-cgi
make: 'sapi/cgi/php-cgi' is up to date.
+ cp -af php_config.h.apxs main/php_config.h
+ cp -af php_config.h.fpm main/php_config.h
+ make -f Makefile.fpm sapi/fpm/php-fpm
/bin/sh /root/rpmbuild/BUILD/php-7.1.10/libtool --silent --preserve-dup-deps --mode=compile cc -I/root/rpmbuild/BUILD/php-7.1.10/sapi/fpm -Isapi/fpm/ -I/root/rpmbuild/BUILD/php-7.1.10/sapi/fpm/ -DPHP_ATOM_INC -I/root/rpmbuild/BUILD/php-7.1.10/include -I/root/rpmbuild/BUILD/php-7.1.10/main -I/root/rpmbuild/BUILD/php-7.1.10 -I/root/rpmbuild/BUILD/php-7.1.10/ext/date/lib -I/usr/include/libxml2 -I/usr/include/enchant -I/usr/X11 -I/usr/include/freetype2 -I/usr/include/imap -I/usr/lib64/firebird/include -I/root/rpmbuild/BUILD/php-7.1.10/include/mbfl -I/usr/include/mysql -I/usr/include/mysql/.. -I/usr/include/pspell -I/usr/include/xmlrpc-epi -I/root/rpmbuild/BUILD/php-7.1.10/TSRM -I/root/rpmbuild/BUILD/php-7.1.10/Zend    -I/usr/include -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fstack-protector-all -fPIC -L/usr/lib64 -fno-strict-aliasing -DZEND_SIGNALS   -c /root/rpmbuild/BUILD/php-7.1.10/sapi/fpm/fpm/fpm.c -o sapi/fpm/fpm/fpm.lo 
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
Makefile.fpm:637: recipe for target 'sapi/fpm/fpm/fpm.lo' failed
make: *** [sapi/fpm/fpm/fpm.lo] Error 1
chyba: Špatný návratový kód z /var/tmp/rpm-tmp.6UwOY2 (%build)
cognitus commented 7 years ago

Hello,

Are you with root user? remember compile with your own user

before you compile make sure delete folder of php created from php build rm -rf ~/rpmbuild/BUILD/php-7.1.10/ (in your case) rm -rf /root/rpmbuild/BUILD/php-7.1.10/

can you upload the compiled output? use: cd ~/rpmbuild/SOURCES/ rpmbuild -ba php.spec &> php7-build-log.txt

waclaw66 commented 7 years ago

Hello. I tried compile it again on my user account with fresh clone from master. But no luck. There is the log... https://drive.google.com/open?id=0B4ZksankjMs9dnhEQjhZbUZuMkE

cognitus commented 7 years ago

ok, first, you haven't setup file ~/.rpmmacros .rpmmacros file creation

second, have you installed libtool? i remember it was installed with task-c(++)-devel if not, tell me for add to readme

urpmi libtool

finally, you compiled php thread safety , change you something in .spec file? if not, i'm going to add a patch. Instead a a threaded PHP you should use fastcgi or fpm

greetings

waclaw66 commented 7 years ago

You're right, I haven't setup rpmmacros, but libtool is installed and the compile result is still the same. No I didn't change anything within .spec file. I'ts a fresh Mageia 6 installation with untouched master clone of php7-mga.

cognitus commented 7 years ago

Well, I mounted a VM with mageia 6 (net install) without anything and I wasn't unable reproduce... but, I think know what's happen. So, clone the branch "dev" and try compile if give an error upload the log

waclaw66 commented 7 years ago

Unfortunatelly still the same :( ... https://drive.google.com/open?id=0B4ZksankjMs9RnQ3WDc1MzA5WDQ

cognitus commented 7 years ago

I added another patch en dev branch, try again...

waclaw66 commented 7 years ago

Still error, but different one... https://drive.google.com/open?id=0B4ZksankjMs9WTlPWW5KaXA0dzg Is something wrong with my Mageia 6 installation? Do you plan to release some .rpm?

cognitus commented 7 years ago

well, the error is produced by it's no recognized libtool of your system and used the default linker shipped php. It's weird, I try in my laptop, my pc, MV and never give that error... 😩

So the patched introduced in dev branch forced that, maybe you can try compile in a VM with a minimal installation.

Do you plan to release some .rpm? Yeah, but the question is where? the packages have to signed and distributed in a secure server, and I haven't access to them.

now, if you really want the .rpm i can provide to you but by your own risk

waclaw66 commented 7 years ago

Success! After the latest update I'm able to compile it. The machine which I use is Virtualbox VM. I'll try to create a new one with minimal setup and we'll see whether the error will appear again.

cognitus commented 7 years ago

finally! 👍 tell me if compile with the VM

waclaw66 commented 7 years ago

I created new netinstall VM of Mageia 6 with minimal setup. Then cloned master branch and followed steps from README. The first compile ended with error...

checking for Firebird support... yes, shared
checking for fb_config... no
checking for isc_detach_database in -lfbclient... no
checking for isc_detach_database in -lgds... no
checking for isc_detach_database in -lib_util... no
configure: error: libfbclient, libgds or libib_util not found! Check config.log for more information.
error: Bad exit status from /home/waclaw/rpmbuild/tmp/rpm-tmp.gHv6Hk (%build)

RPM build errors:
    Bad exit status from /home/waclaw/rpmbuild/tmp/rpm-tmp.gHv6Hk (%build)

Therefore I installed manually lib64fbclient-devel which wasn't required by dnf builddep php.spec. Then I tried compile it again. Success! My original VM was installed from Mageia-6-x86_64-DVD.iso and updated, so there is maybe the problem with libtool.

Thanks for the support!

cognitus commented 7 years ago

Therefore I installed manually lib64fbclient-devel which wasn't required by dnf builddep php.spec.

I know libfbclient-devel is required but if i add to the BuildRequires always install the i586 version instead x86_64, independent of arch, no idea why 😩 (i'm gonna add to readme)

Then I tried compile it again. Success!

its great!