Building mysql57-server from ports - fatal error: 'endian.h' file not found

Hi,
Trying to build databases/mysql57-server, all settings - default, stuck on error:

Code:
ion -Wno-unused-private-field
-- CMAKE_C_LINK_FLAGS:
-- CMAKE_CXX_LINK_FLAGS:
-- CMAKE_C_FLAGS_RELEASE: -O2 -pipe -march=native  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -DDBUG_OFF
-- CMAKE_CXX_FLAGS_RELEASE: -O2 -pipe -march=native -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -DDBUG_OFF
-- Configuring incomplete, errors occurred!
See also "/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeOutput.log".
See also "/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeError.log".
*** Error code 1

errors in CMakeError.log:
Code:
Source:
Building C object CMakeFiles/cmTC_dadbc.dir/HAVE_ENDIAN_H.c.o
/usr/bin/cc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/local/include/editline  -O2 -pipe -march=native  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement    -o CMakeFiles/cmTC_dadbc.dir/HAVE_ENDIAN_H.c.o   -c /usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CheckIncludeFiles/HAVE_ENDIAN_H.c
/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CheckIncludeFiles/HAVE_ENDIAN_H.c:2:10: fatal error: 'endian.h' file not found
#include <endian.h>
         ^~~~~~~~~~
1 error generated.
gmake[5]: *** [CMakeFiles/cmTC_dadbc.dir/build.make:66: CMakeFiles/cmTC_dadbc.dir/HAVE_ENDIAN_H.c.o] Error 1
gmake[5]: Leaving directory '/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeTmp'
gmake[4]: *** [Makefile:126: cmTC_dadbc/fast] Error 2
gmake[4]: Leaving directory '/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeTmp'

Source:
/* */
#include <endian.h>


int main(void){return 0;}
 
What FreeBSD version?

Generally speaking though problems like these are often caused by build dependencies which aren't in check. Not always, but often. When I have issues with building a port the first thing I usually do is re-building the direct dependencies: portmaster `make build-depends-list | cut -d '/' -f 4-` |& tee build.log, stuff like that.

hope this can help.
 
ShelLuser,
Thank you so much for quick response!
Version: FreeBSD srv1 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #0: Tue May 8 05:21:56 UTC 2018

Build in progress - it might take a while ...

Thank you
 
What FreeBSD version?

Generally speaking though problems like these are often caused by build dependencies which aren't in check. Not always, but often. When I have issues with building a port the first thing I usually do is re-building the direct dependencies: portmaster `make build-depends-list | cut -d '/' -f 4-` |& tee build.log, stuff like that.

hope this can help.

I have the same problem but that didn't work for me
make: "/usr/ports/databases/mysql57-client/../mysql57-server/Makefile" line 1: Need an operator
 
Does /etc/make.conf exist? If so, what does it contain?
 
Ok, that's fine. That setting shouldn't be a problem. What's the exact command you used to build it?
 
I'm trying to find an easy way to check but can't find anything on short notice. So lets have a look at something obvious, what's the first line of /usr/ports/databases/mysql57-server/Makefile? It's giving an error about it and I'm wondering why, the first line should be a remark:
Code:
# Created by: Mahdi Mokhtari <mokhi64@gmail.com>
 
I'm trying to find an easy way to check but can't find anything on short notice. So lets have a look at something obvious, what's the first line of /usr/ports/databases/mysql57-server/Makefile? It's giving an error about it and I'm wondering why, the first line should be a remark:
Code:
# Created by: Mahdi Mokhtari <mo****@gmail.com>
# Created by: Mahdi Mokhtari <mo****@gmail.com>
 
That's a good one, it might be counting from the first "real" line and skip all the remarks/empty lines. In that case it should be:
Code:
PORTNAME?=       mysql
 
Well, I'm out of ideas. The only thing I can think of now is a broken/bad ports tree. If you use portsnap(8) you might want to try doing portsnap extract to get a fresh, clean, copy again.
 
Is there any particular reason to use ports? If you're fine with the default options why not use the packages instead?
 
It's installing from ports now The next time I tried the command you posted above it worked and ran for a long time and installed mysql57-client (and deps I guess?) I'll post back when install finishes
 
Is there any particular reason to use ports? If you're fine with the default options why not use the packages instead?
It installed but when i try to start the server `/usr/local/etc/rc.d/mysql-server start` it says starting mysql but then I can't connect
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
that error means the server's not running and `ps auxw|grep mysql` doesn't show any running processes
 
Back
Top