mysql56-client build errors on 10-STABLE [SOLVED]

I'm having trouble getting the databases/mysql56-client port to build on FreeBSD 10.2-STABLE. The C compiler (clang) is griping about numerous errors in the yassl code.

Here's the output: http://pastebin.com/raw.php?i=kXaDDJJY

All I'm doing: portmaster databases/mysql56-server (it builds databases/mysql56-client as well). The ports collection is up to date.

Platform: BeagleBone Black rev. C, with the 20150903-r287435 FreeBSD 10.2-STABLE snapshot from ftp.freebsd.org.

Any idea why this is happening?
 
Why you use ports(7)? Ports is broken .

Use a clean FreeBSD and these commands:
pkg update
pkg install mysql56-server
 
Last edited by a moderator:
You seem to have security/openssl installed or at least the OpenSSL include files are installed in /usr/local/include/openssl. Do you have WITH_OPENSSL_PORT=yes set in /etc/make.conf?
 
They are? Last time I checked they were working just fine. Maybe you should use FreeBSD ports for a while yourself before you make such statements in public.
For me using ports is useless.
The package tool is the best.

Why? With ports if you install some package , it creates conflicts.. etc

If you want to install MySQL, do what i said before.
 
Sorry, that is nonsense. Which is created conflicts, pkg(8) or ports? - it is philosophic. It is the difference of versions between pkg(8) and ports. Both work.
If u want to install MySQL do what i said before.
And hundreds installed it before with the port.
 
Why run 10-STABLE instead of 10-RELEASE? Because support for my hardware (the BeagleBone Black, a Raspberry Pi-like board with an ARMv6 processor) requires 10-STABLE or 11-CURRENT, the only armv6 snapshots available.

Which clang version?
Code:
[CMD=%]cc -v[/CMD]
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: armv6--freebsd10.2-gnueabi
Thread model: posix
Selected GCC installation

Contents of /etc/make.conf:
WITH_PKGNG=yes

Yes, security/openssl is installed. It is a required dependency for opensmtpd, which I want to run instead of sendmail; WITH_OPENSSL_PORT=yes is in mail/opensmtpd's Makefile. security/openssl is also getting installed when I enable the CA_BUNDLE option for various ports (like opensmtpd and ftp/curl).
 
Why run 10-STABLE instead of 10-RELEASE? Because support for my hardware (the BeagleBone Black, a Raspberry Pi-like board with an ARMv6 processor) requires 10-STABLE or 11-CURRENT, the only armv6 snapshots available.

Which clang version?
Code:
[CMD=%]cc -v[/CMD]
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: armv6--freebsd10.2-gnueabi
Thread model: posix
Selected GCC installation

Contents of /etc/make.conf:
WITH_PKGNG=yes

Yes, security/openssl is installed. It is a required dependency for opensmtpd, which I want to run instead of sendmail; WITH_OPENSSL_PORT=yes is in mail/opensmtpd's Makefile. security/openssl is also getting installed when I enable the CA_BUNDLE option for various ports (like opensmtpd and ftp/curl).

There's a problem with the port in that case. The build should ignore OpenSSL in /usr/local because you're selecting the use of base system OpenSSL for databases/mysql56-client. File a PR.
 
You can try in the port: CFLAGS+="-ferror-limit=0", or portmaster -m CFLAGS+="-ferror-limit=0" databases/mysql56-client.


Another question is: With clang error messages like "redefined warning" or
Code:
macro redefined
it seems appears a lot more as in the past - thinking about if it makes sense (?).
 
As a possible work-around you can try the attached patch. It causes the port to build against the system OpenSSL instead of using the bundled one. Please note that this has not been tested in any way other than compiling the port.
 

Attachments

  • mysql56.txt
    623 bytes · Views: 209
The above suggestion I wrote would not work, overlooked use of undeclared identifier 'SSL_SUCCESS'.
I think it is caused by namespace yassl and the extern "C" pragma in ssl.cpp. Similiar problems in other programs I fixed with:
Code:
// replace
extern "C"
// with
#ifdef __cplusplus
extern "C" {
#endif
...
...
...
#ifdef __cplusplus
}
end extern "C"
in the related header-files.

I tested it not here, cause I can not reproduce the error.
 
Last edited:
Thanks!!
The of iddqd patch seems to work !!

I also have ports-based openssl installation, which causes the issue.
By adding the options in the Makefile it builds and runs!

Code:
   -DWITH_SSL="system"

USE_OPENSSL= yes
 
As a possible work-around you can try the attached patch. It causes the port to build against the system OpenSSL instead of using the bundled one. Please note that this has not been tested in any way other than compiling the port.

Does your patch take into account WITH_OPENSSL_PORT=yes? The future of OpenSSL in FreeBSD looks very much like that the base system OpenSSL will be hidden from ports and for ports there will be only security/openssl or security/libressl.
 
Yes. The use of the USE_OPENSSL variable ensures that it will (hopefully) select the proper OpenSSL installation. My testing was done with WITH_OPENSSL_PORT=YES and compilation succeeded without error. But that's as far as I tested it. :)
 
On a side note percona56-{client,server} suffer from the same issue. The same "fix" can be used for them as well.
 
Nice! I'm glad there's a global fix. I updated my ports collection and everything seems to be OK now. Hooray!
 
Back
Top