Bug #63806 Bad Makefiles generated in 5.2.36
Submitted: 20 Dec 2011 10:50 Modified: 21 Dec 2011 15:00
Reporter: Zoltán Pósfai Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.36 OS:Linux (Slackware-current)
Assigned to: CPU Architecture:Any
Tags: Contribution

[20 Dec 2011 10:50] Zoltán Pósfai
Description:
I had 5.2.31a working alright. While compiling 5.2.36 today, I ran into several Makefile related problems. Some of them lack some -I directives. I'm not in the automake business so I can only attached the 'patches' to the generated Makefiles. 

How to repeat:
I'm using my slackbuild script (that I can attach if needed), but the relevant portions are:

========
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
========

and

========
./autogen.sh \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --build=$ARCH-slackware-linux \
  --disable-debug \
  --enable-shared=yes \
  --enable-static=no \
  --enable-python-modules \
  --enable-readline
=======

and 'make' of course.

Suggested fix:
See attached patches to the _generated_ Makefiles.
[20 Dec 2011 10:51] Zoltán Pósfai
Patch for the scintilla Makefile

Attachment: scintilla-Makefile.patch (text/x-diff), 1.06 KiB.

[20 Dec 2011 10:52] Zoltán Pósfai
Patch for the cppconn Makefile

Attachment: cppconn-driver-Makefile.patch (text/x-diff), 755 bytes.

[21 Dec 2011 3:00] Alfredo Kojima
What does mysql_config --libs output in your system?
[21 Dec 2011 3:03] Alfredo Kojima
What are the errors generated by the "lacking -I directives"? The makefiles work fine in all supported distributions in our build environment.
Also, Makefiles are generated by configure from Makefile.in and Makefile.am files, 
so any changes made to Makefiles would be lost.
[21 Dec 2011 9:48] Zoltán Pósfai
Regarding mysql_config:

-rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib/ -lssl -lcrypto
[21 Dec 2011 9:54] Zoltán Pósfai
> What are the errors generated by the "lacking -I directives"?
The usual xxx.h not found errors when you have a header file missing or out of your path.

> The makefiles work fine in all supported distributions in our build environment.

This is why we have bug trackers around :)
> Also, Makefiles are generated by configure from Makefile.in and Makefile.am
files,  so any changes made to Makefiles would be lost.

I am aware of that. That's why I emphasized several times that I'm not into automake and my patches are against the generated Makefiles. They are not the solution, just show you what was not found.

I compile a lot and also make dozens of Slackware packages and I do not run into this problem with other software. Configure works well in all other cases I had in the last few years.

If you need any more information to track this down. I'm glad to help!
[21 Dec 2011 13:05] Alfredo Kojima
So as you can see from the output of mysql_config, the problem with -L/usr/lib is not in Workbench, it's in the MySQL package you're using.
[21 Dec 2011 13:05] Alfredo Kojima
About missing -I, can you paste a sample full gcc command line and error message?
[21 Dec 2011 13:22] Zoltán Pósfai
About mysql: Sorry I don't get it... what's the problem with my mysql libs?
I have both 32/64 bit libs in place so that list is OK (IMHO). Also, it's not the linking that has probs but the compilation.
[21 Dec 2011 14:19] Alfredo Kojima
Your mysql lib package is the one providing the wrong flags for linkage. Changing things in Workbench to adapt to that is the wrong thing to do.