Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#14387 closed defect (fixed)

php5 +mysql fails to build when using mysql5-devel 5.1.23-rc

Reported by: paulbeard@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: jyrkiwahlstedt, mitizhi@…
Port:

Description

should it fail/exit if not version number for mysql is passed as an argument? it seems from port variants php5 that I should have used mysql5.

--->  Building php5 with target all
/bin/sh /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/libtool --silent --preserve-dup-deps --mode=compile /usr/bin/gcc-4.0  -Iext/mysqli/ -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/ -DPHP_ATOM_INC -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/main -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5 -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/date/lib -I/opt/local/include/freetype2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mbstring/oniguruma -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mbstring/libmbfl -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mbstring/libmbfl/mbfl -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/mysql5/include/mysql -I/opt/local/include/mysql5/mysql -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/TSRM -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/Zend  -I/opt/local/include -no-cpp-precomp  -I/opt/local/include -O2  -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c -o ext/mysqli/mysqli_api.lo 
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_change_user':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:420: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:420: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:420: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_kill':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1152: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1152: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1152: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_ping':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_prepare':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1376: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1377: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_real_connect':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1453: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1454: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_real_query':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_select_db':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_store_result':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_use_result':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_error'
make: *** [ext/mysqli/mysqli_api.lo] Error 1
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5" && make all " returned error 2
Command output: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_ping':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_prepare':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1376: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1377: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_real_connect':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1453: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1454: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_real_query':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_select_db':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_store_result':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_error'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_use_result':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_errno'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_error'
make: *** [ext/mysqli/mysqli_api.lo] Error 1

Warning: the following items did not execute (for php5): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

Change History (8)

comment:1 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jwa@… added
Owner: changed from macports-tickets@… to ryandesign@…

According to "port variants php5" there is no variant called "mysql". Please select one of "mysql3", "mysql4" or "mysql5".

I'm not sure why you got such an error message. I'll look into it.

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Unable to reproduce. "sudo port install +apache2 +mysql" works for me -- that is, it correctly builds PHP 5 with Apache 2 support and without any MySQL support. The port that ends up getting installed is "php5 @5.2.5_1+apache2+macosx". ("+mysql" does not appear in the string because, as the debug output correctly notes, "Requested variant mysql is not provided by port php5".)

I can look into this further if you will attach your debug output to this ticket. Please do this:

sudo port selfupdate
sudo port clean --work php5
sudo port -dv install php5 +apache2 +mysql &> ~/Desktop/php5-apache2-mysql.txt

Then attach the file php5-apache2-mysql.txt on your desktop to this ticket.

comment:3 in reply to:  description Changed 16 years ago by mitizhi@…

...

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_php5/work/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_error'

make: * [ext/mysqli/mysqli_api.lo] Error 1

Warning: the following items did not execute (for php5): org.macports.activate org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing. }}}

I stumbled on this same thing. I am using variant +mysql5. My exact install command was:

 port install php5 +apache2 +tidy +mysql5 +sqlite +ipc +pcntl +pear +sockets

but I think installing mysql5-devel (version 5.1.23-rc) and attempting to install php5 with +mysql5 should be enough to reproduce.

I researched the cause. It is due to current API change in mysql libraries, introduced by mysql version 5.1.23-rc. It seems mysql and PHP communities are discussing whose bug it is (behind the curtains):

You can search the net with the file name mysqli_api.c and relevant parts of the error message to come up with other communities stumbling on this.

Except also build problems with perl with mysql5 (according to mysql bug report ticket page)?

To reproduce with macports, you need to install mysql5-devel. mysql5 is older version and probably does not cause problems?? [I am very newbie with macports and BSD thinking; I thought -devel packages are needed for development (like in Debian Linux), but it seems now to me -devel packages are newer versions of the package; maybe the meaning of -devel could be documented more clearly in macports guide?]

Relevant version information describing my situation:

$ for action in list installed; do echo $action:;port $action | grep mysql5; done
list:
mysql5                         @5.0.51         databases/mysql5
mysql5-devel                   @5.1.23-rc      databases/mysql5-devel
installed:
  mysql5 @5.0.51_0
  mysql5-devel @5.1.23-rc_1+darwin_8+server (active)
  py25-mysql @1.2.2_0+mysql5 (active)

comment:4 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks for the info. I guess we'll just let the mysql and php developers sort it out for now. If I have time I'll try to confirm that mysql5-devel @5.1.23-rc and php5 @5.2.5_1+mysql5 do not like one another. Note there is also a php5-devel @5.2.6RC1 you could try.

Yes, -devel ports should be documented. I filed ticket #14540 for this.

comment:5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mitizhi@… added

comment:6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Status: newassigned
Summary: php5 +apache2 +mysql fails to buildphp5 +mysql fails to build when using mysql5-devel 5.1.23-rc

Ok, the verdict is that this is a bug in MySQL, introduced in 5.1.23-rc, and it will be fixed in 5.1.24-rc. As mentioned above, see PHP bug 44137 and especially MySQL bug 34655. Until MySQL 5.1.24-rc is released, I'll add a patch to mysql5-devel to fix this, based on their fix. See also #14579.

comment:7 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

On second thought, I'll fix it like js suggested in #14579, with a reinplace. An 11-line reinplace is simpler than a 508-line patchfile (that's after I removed irrelevancies; before doing that, their patchfile is 869 lines).

Though the original diff and js's patch from #14579 patch the files log_event.cc and log_event_old.cc, those files do not appear to contain the affected variables in version 5.1.23-rc. Presumably those variables were added to those files after 5.1.23-rc was released. As such, we don't need to patch them for 5.1.23-rc.

Fixed in r35021. Please wait 12 hours for the portindex to catch up, then "sudo port selfupdate" and "sudo port upgrade mysql5-devel" and then try building php5 again.

comment:8 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.