Bug 159569

Summary: mysql-devel: missing dependency on openssl-devel
Product: [Fedora] Fedora Reporter: Ville Skyttä <scop>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: hhorak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-13 03:48:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ville Skyttä 2005-06-04 18:09:47 UTC
"Requires: openssl-devel" should be added to mysql-devel, see for example
"mysql_config --libs".  Apps using this information will fail to build unless
they explicitly pull in openssl-devel even though they had nothing to do with
SSL -> should be fixed in mysql-devel instead.

OTOH I don't know if it's necessary to have the SSL and friends in the libs
returned by mysql_config in the first place.  If not, pruning them would be even
better than adding the dependency.

Comment 1 Tom Lane 2005-06-05 01:15:07 UTC
Hmm, I'm not sure about this.  I don't see any #include dependency in the headers mysql-devel installs, 
and so it doesn't seem like the openssl-devel files would be needed.  You'd certainly need libssl.so, but 
that should be required by libmysql.so.  Unless maybe you are trying to link statically?  What did you do 
exactly, and what failure did you see?

Comment 2 Ville Skyttä 2005-06-05 06:52:07 UTC
Tried to build the MySQL driver for Gnokii's smsd:

http://savannah.nongnu.org/cgi-bin/viewcvs/gnokii/gnokii/smsd/Makefile?rev=.&content-type=text/vnd.viewcvs-markup

libmysql.la: mysql.lo
	$(LIBTOOL) --mode=link $(CC) -o libmysql.la mysql.lo \
	$(shell $(GLIBLDLIBS)) $(shell mysql_config --libs) \
	-export-dynamic -avoid-version -rpath ${libdir}/smsd

...which results in this failure unless I add an explicit build dependency on
openssl-devel (even though this app does not do anything with openssl itself):

http://bugzilla.livna.org/attachment.cgi?id=117

gcc -shared  .libs/mysql.o  -Wl,--rpath -Wl,/usr/lib64 -Wl,--rpath
-Wl,/usr/lib64 -L/usr/lib64 /usr/lib64/libglib.so -L/usr/lib64/mysql
-lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto  -Wl,-soname -Wl,libmysql.so
-o .libs/libmysql.so
/usr/bin/ld: cannot find -lssl


Comment 3 Tom Lane 2005-06-05 15:34:53 UTC
Oh, duh, it fails because the base openssl package only contains libssl.so.N and
not the libssl.so symlink.  OK, I'll add the dependency in the next respin.  I
think trying to remove -lssl from the libs list would be too fragile --- it'd
fail in static links, for instance.

Note to self: check postgresql for same issue.

Comment 4 Tom Lane 2005-07-13 03:48:16 UTC
Fixed as of mysql-4.1.12-1.  Thanks for the report!