mysqlcc will be broken when we update to mariadb-10.2.3+.

First problem: it errors out if it cannot find libmysqlclient.a, no
longer shipped (by default?) in recent versions.  A small but ugly patch
to ./configure solves this.

Second problem: it includes headers that aren't supposed to be used in
client applications, and have been moved to include/mysql/server.  Fix:
add include/mysql/server to the include path.

Third (maybe not the last) problem: said server-only headers don't seem
to be usable as-is any more.  Error message (and diff) below.

I initially tried to fix this port instead of removing it, because it is
afaik the only gui application we have to manage a mysql server.

But I'll stop here for various reasons:
- old software, no new release since 2013
- fixes for recent mysql/mariadb version ignored since 2015:
  https://sourceforge.net/p/mysqlcc/patches/4/
- uses qt3.  Who doesn't want to get rid of qt3?

ok to remove this port instead of keeping it on life support?


--8<--
c++ -c -DLOCALBASE=\"/usr/local\" -DNDEBUG -Wall -W -O2 -pipe   -pthread  
-DQT_DLL -DHAVE_MYSQLCC_CONFIG -DQT_NO_DEBUG -DQT_THREAD_SUPPORT 
-I/usr/ports/databases/mysqlcc/files -I. -Iinclude -Ishared/include 
-Iinclude/CSqlEditor -I../../../../local/include/mysql 
-I/usr/local/include/mysql/private -I../../../../local/include/mysql/server 
-I/usr/local/include -I/usr/local/include/X11/qt3 -I../../../../X11R6/include 
-Imoc/ -o tmp/main.o src/main.cpp
In file included from src/main.cpp:19:
../../../../local/include/mysql/my_global.h:3:2: warning: This file should not 
be included by clients, include only <mysql.h> [-W#warnings]
#warning This file should not be included by clients, include only <mysql.h>
 ^
In file included from src/main.cpp:20:
../../../../local/include/mysql/my_sys.h:3:2: warning: This file should not be 
included by clients, include only <mysql.h> [-W#warnings]
#warning This file should not be included by clients, include only <mysql.h>
 ^
In file included from src/main.cpp:24:
In file included from ../../../../local/include/mysql/server/m_string.h:25:
In file included from ../../../../local/include/mysql/server/my_global.h:75:
../../../../local/include/mysql/my_config.h:3:2: warning: This file should not 
be included by clients, include only <mysql.h> [-W#warnings]
#warning This file should not be included by clients, include only <mysql.h>
 ^
In file included from src/main.cpp:24:
In file included from ../../../../local/include/mysql/server/m_string.h:25:
In file included from ../../../../local/include/mysql/server/my_global.h:493:
In file included from ../../../../local/include/mysql/server/my_compiler.h:27:
../../../../local/include/mysql/my_global.h:3:2: warning: This file should not 
be included by clients, include only <mysql.h> [-W#warnings]
#warning This file should not be included by clients, include only <mysql.h>
 ^
In file included from src/main.cpp:24:
In file included from ../../../../local/include/mysql/server/m_string.h:25:
../../../../local/include/mysql/server/my_global.h:562:9: error: unknown type 
name 'SOCKET_SIZE_TYPE'
typedef SOCKET_SIZE_TYPE size_socket;
        ^
../../../../local/include/mysql/server/my_global.h:754:2: error: "please add 
-DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
#error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
 ^
../../../../local/include/mysql/server/my_global.h:764:2: error: WHAT? 
sizeof(long long) < 8 ???
#error WHAT? sizeof(long long) < 8 ???
 ^
../../../../local/include/mysql/server/my_global.h:852:22: error: static 
declaration of 'log2' follows non-static declaration
static inline double log2(double x)
                     ^
/usr/include/math.h:211:8: note: previous declaration is here
double log2(double);
       ^
In file included from src/main.cpp:24:
In file included from ../../../../local/include/mysql/server/m_string.h:25:
../../../../local/include/mysql/server/my_global.h:937:2: error: Neither int or 
long is of 4 bytes width
#error Neither int or long is of 4 bytes width
 ^
In file included from src/main.cpp:24:
In file included from ../../../../local/include/mysql/server/m_string.h:25:
In file included from ../../../../local/include/mysql/server/my_global.h:1067:
In file included from ../../../../local/include/mysql/server/my_byteorder.h:38:
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:39:18: 
error: use of undeclared identifier 'uint32'
  ulonglong a= *(uint32 *) p;
                 ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:39:26: 
error: expected expression
  ulonglong a= *(uint32 *) p;
                         ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:45:18: 
error: use of undeclared identifier 'uint32'
  ulonglong a= *(uint32 *) p;
                 ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:45:26: 
error: expected expression
  ulonglong a= *(uint32 *) p;
                         ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:91:18: 
error: use of undeclared identifier 'uint32'
  ulonglong a= *(uint32 *) p;
                 ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:91:26: 
error: expected expression
  ulonglong a= *(uint32 *) p;
                         ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:100:18: 
error: use of undeclared identifier 'uint32'
  ulonglong a= *(uint32 *) p;
                 ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:100:26: 
error: expected expression
  ulonglong a= *(uint32 *) p;
                         ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:109:18: 
error: use of undeclared identifier 'uint32'
  ulonglong a= *(uint32 *) p;
                 ^
../../../../local/include/mysql/server/byte_order_generic_x86_64.h:109:26: 
error: expected expression
  ulonglong a= *(uint32 *) p;
                         ^
In file included from src/main.cpp:24:
In file included from ../../../../local/include/mysql/server/m_string.h:25:
../../../../local/include/mysql/server/my_global.h:1198:22: error: static 
declaration of 'rint' follows non-static declaration
static inline double rint(double x)
                     ^
/usr/include/math.h:225:8: note: previous declaration is here
double rint(double);
       ^
In file included from src/main.cpp:24:
In file included from ../../../../local/include/mysql/server/m_string.h:25:
../../../../local/include/mysql/server/my_global.h:1208:48: error: use of 
undeclared identifier 'DBL_MANT_DIG'
                                 i <= (double) MAX_EXACT_INTEGER &&
                                               ^
../../../../local/include/mysql/server/my_global.h:1188:36: note: expanded from 
macro 'MAX_EXACT_INTEGER'
#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1)
                                   ^
../../../../local/include/mysql/server/my_global.h:1212:50: error: use of 
undeclared identifier 'DBL_MANT_DIG'
                                  i >= (double) -MAX_EXACT_INTEGER &&
                                                 ^
../../../../local/include/mysql/server/my_global.h:1188:36: note: expanded from 
macro 'MAX_EXACT_INTEGER'
#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1)
                                   ^
In file included from src/main.cpp:24:
../../../../local/include/mysql/server/m_string.h:224:20: error: use of 
undeclared identifier 'strlen'; did you mean 'strend'?
  lex_str->length= strlen(c_str);
                   ^~~~~~
                   strend
../../../../local/include/mysql/server/m_string.h:94:14: note: 'strend' 
declared here
extern  char *strend(const char *s);
              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 warnings and 20 errors generated.
*** Error 1 in /usr/ports/pobj/mysqlcc-1.0.2/mysqlcc-1.0.2-src (Makefile:608 
'tmp/main.o')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2800 
'/usr/ports/pobj/mysqlcc-1.0.2/.build_done')
*** Error 1 in /usr/ports/databases/mysqlcc 
(/usr/ports/infrastructure/mk/bsd.port.mk:2466 'all')
russell /usr/ports/databases/mysqlcc$
-->8--

Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/databases/mysqlcc/patches/patch-configure,v
retrieving revision 1.3
diff -u -p -r1.3 patch-configure
--- patches/patch-configure     21 Sep 2014 17:32:41 -0000      1.3
+++ patches/patch-configure     8 May 2019 20:26:24 -0000
@@ -1,38 +1,68 @@
 $OpenBSD: patch-configure,v 1.3 2014/09/21 17:32:41 brad Exp $
---- configure.orig     Sun Oct  8 16:40:01 2006
-+++ configure  Mon Sep 15 11:47:13 2014
-@@ -2457,9 +2457,9 @@ echo "${ECHO_T}" >&6
-         for dir in $mysql_lib; do
-             if test "x$mysql_found" != "xyes"
-             then
+Index: configure
+--- configure.orig
++++ configure
+@@ -2450,42 +2450,13 @@ echo "${ECHO_T}" >&6
+ 
+         SAVE_LIBS=$LIBS
+ 
+-        mysql_lib="$mysql_lib /usr/lib /usr/lib/mysql \
+-                   /usr/local/lib /usr/local/lib/mysql \
+-                   /usr/local/mysql/lib /usr/lib64/mysql"
++                    if test "x$mysql_lib" != "x"; then
++                        LIBS="-L$mysql_lib $SAVE_LIBS $LIBZ_LIB"
++                    else
++                        LIBS="$SAVE_LIBS $LIBZ_LIB"
++                    fi
++                    MYSQL_LIB="-lmysqlclient $LIBZ_LIB"
+ 
+-        for dir in $mysql_lib; do
+-            if test "x$mysql_found" != "xyes"
+-            then
 -                as_ac_File=`echo "ac_cv_file_"$dir/libmysqlclient.so"" | 
$as_tr_sh`
 -echo "$as_me:$LINENO: checking for \"$dir/libmysqlclient.so\"" >&5
 -echo $ECHO_N "checking for \"$dir/libmysqlclient.so\"... $ECHO_C" >&6
-+                as_ac_File=`echo "ac_cv_file_"$dir/libmysqlclient.a"" | 
$as_tr_sh`
-+echo "$as_me:$LINENO: checking for \"$dir/libmysqlclient.a\"" >&5
-+echo $ECHO_N "checking for \"$dir/libmysqlclient.a\"... $ECHO_C" >&6
- if eval "test \"\${$as_ac_File+set}\" = set"; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-@@ -2467,7 +2467,7 @@ else
-   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross 
compiling" >&5
- echo "$as_me: error: cannot check for file existence when cross compiling" 
>&2;}
-    { (exit 1); exit 1; }; }
+-if eval "test \"\${$as_ac_File+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  test "$cross_compiling" = yes &&
+-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross 
compiling" >&5
+-echo "$as_me: error: cannot check for file existence when cross compiling" 
>&2;}
+-   { (exit 1); exit 1; }; }
 -if test -r ""$dir/libmysqlclient.so""; then
-+if test -r ""$dir/libmysqlclient.a""; then
-   eval "$as_ac_File=yes"
- else
-   eval "$as_ac_File=no"
-@@ -2484,7 +2484,7 @@ fi
-                 if test "x$mysql_found" = "xyes"
-                 then
-                     LIBS="-L$dir $SAVE_LIBS $LIBZ_LIB"
+-  eval "$as_ac_File=yes"
+-else
+-  eval "$as_ac_File=no"
+-fi
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+-if test `eval echo '${'$as_ac_File'}'` = yes; then
+-  mysql_found=yes
+-else
+-  mysql_found=no
+-fi
+-
+-                if test "x$mysql_found" = "xyes"
+-                then
+-                    LIBS="-L$dir $SAVE_LIBS $LIBZ_LIB"
 -                    MYSQL_LIB="$dir/libmysqlclient.so $LIBZ_LIB"
-+                    MYSQL_LIB="-lmysqlclient $LIBZ_LIB"
- 
+-
                      echo "$as_me:$LINENO: checking for mysql_real_connect in 
-lmysqlclient" >&5
  echo $ECHO_N "checking for mysql_real_connect in -lmysqlclient... $ECHO_C" >&6
-@@ -3184,7 +3184,7 @@ fi
+ if test "${ac_cv_lib_mysqlclient_mysql_real_connect+set}" = set; then
+@@ -2547,10 +2518,6 @@ else
+   mysql_ok=no
+ fi
+ 
+-                fi
+-            fi
+-        done
+-
+         if test "x$mysql_ok" != "xyes"
+         then
+             { { echo "$as_me:$LINENO: error: Could not find libmysqlclient in 
'$mysql_lib'" >&5
+@@ -3184,7 +3151,7 @@ fi
  
  echo "$as_me:$LINENO: checking \"if Qt Version in $QTDIR is >= 3.0.5\"" >&5
  echo $ECHO_N "checking \"if Qt Version in $QTDIR is >= 3.0.5\"... $ECHO_C" >&6
@@ -41,7 +71,7 @@ $OpenBSD: patch-configure,v 1.3 2014/09/
  cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
  #include "confdefs.h"
-@@ -4078,7 +4078,7 @@ else
+@@ -4078,7 +4045,7 @@ else
  fi
  
  echo "Creating Makefile with qmake"
Index: patches/patch-mysqlcc_pro_in
===================================================================
RCS file: /cvs/ports/databases/mysqlcc/patches/patch-mysqlcc_pro_in,v
retrieving revision 1.2
diff -u -p -r1.2 patch-mysqlcc_pro_in
--- patches/patch-mysqlcc_pro_in        21 Sep 2014 17:32:41 -0000      1.2
+++ patches/patch-mysqlcc_pro_in        8 May 2019 20:26:24 -0000
@@ -1,6 +1,7 @@
 $OpenBSD: patch-mysqlcc_pro_in,v 1.2 2014/09/21 17:32:41 brad Exp $
---- mysqlcc.pro.in.orig        Fri Aug 11 16:29:36 2006
-+++ mysqlcc.pro.in     Mon Sep 15 11:51:45 2014
+Index: mysqlcc.pro.in
+--- mysqlcc.pro.in.orig
++++ mysqlcc.pro.in
 @@ -1,5 +1,5 @@
  TEMPLATE     = app
 -CONFIG       += qt thread
@@ -15,7 +16,7 @@ $OpenBSD: patch-mysqlcc_pro_in,v 1.2 201
 -      LIBS        += @MYSQL_LIB@ 
 -      INCLUDEPATH += @MYSQL_INCLUDE@
 +      LIBS        += @MYSQL_LIB@ -lz 
-+      INCLUDEPATH += @MYSQL_INCLUDE@ @MYSQL_INCLUDE@/private
++      INCLUDEPATH += @MYSQL_INCLUDE@ @MYSQL_INCLUDE@/private 
@MYSQL_INCLUDE@/server
        CONFIG      += x11 
        OBJECTS_DIR  = tmp
  }


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to