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

nerozero

Member

Reaction score: 1
Messages: 80

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;}
 

ShelLuser

Son of Beastie

Reaction score: 1,719
Messages: 3,539

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.
 
OP
OP
nerozero

nerozero

Member

Reaction score: 1
Messages: 80

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
 

fugee279

Member


Messages: 46

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
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,556
Messages: 30,264

Does /etc/make.conf exist? If so, what does it contain?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,556
Messages: 30,264

Ok, that's fine. That setting shouldn't be a problem. What's the exact command you used to build it?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,556
Messages: 30,264

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>
 

fugee279

Member


Messages: 46

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>
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,556
Messages: 30,264

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
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,556
Messages: 30,264

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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,556
Messages: 30,264

Is there any particular reason to use ports? If you're fine with the default options why not use the packages instead?
 

fugee279

Member


Messages: 46

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
 

fugee279

Member


Messages: 46

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
 

Vull

Well-Known Member

Reaction score: 119
Messages: 285

Why are people installing mysql57-server and not mysql80-server? Just curious.
 
Top