Bug 219832 - lang/yap: Fails to build (unresolved dependency on mysqlclient)
Summary: lang/yap: Fails to build (unresolved dependency on mysqlclient)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo Egea Gondolfo
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2017-06-07 07:02 UTC by dewayne
Modified: 2018-01-14 23:57 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (danilo)
koobs: merge-quarterly?


Attachments
disable myddas (377 bytes, patch)
2017-06-08 01:01 UTC, Danilo Egea Gondolfo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2017-06-07 07:02:03 UTC
While building on FreeBSD11.1 Prerelease, a lang/yap build fails. The config.log reveals a dependency on mysqlclient
--------------
configure:8107: checking size of short int
configure:8112: gcc5 -o conftest -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -pipe -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 -g0 -ggdb0 -DSTRIP_FBSDID -UDEBUG
conftest.c:106:17: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 static long int longval () { return (long int) (sizeof (short int)); }
                 ^
conftest.c:107:26: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 static unsigned long int ulongval () { return (long int) (sizeof (short int)); }
                          ^
conftest.c:111:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 main ()
 ^
/usr/local/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
configure:8112: $? = 1
--------------

Interestingly yap-devel does build and run correctly per:
# make -C /usr/ports/lang/yap-devel -DWITHOUT_MYDDAS -DUSE_K8 clean package
...
===>  Building package for yap-devel-6.3.3_6 

while using the defaults
# make -C /usr/ports/lang/yap-devel -DUSE_K8 clean package
pkg-static: Unable to access file /var/ports/usr/ports/lang/yap-devel/work/stage/usr/local/lib/Yap/odbc4pl.so: No such file or directory
*** Error code 1
Comment 1 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2017-06-08 01:01:16 UTC
Thanks. Can you try the attached patch with lang/yap? I was not able to reproduce the problem with lang/yap-devel though.
Comment 2 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2017-06-08 01:01:45 UTC
Created attachment 183315 [details]
disable myddas
Comment 3 dewayne 2017-06-08 01:35:43 UTC
(In reply to Danilo Egea Gondolfo from comment #2)
Thank-you.  Yes that patch works, so we can close the PR from the yap perspective.

Re yap-devel.  Unfortunately I used yap extensively in the distant past, and had set MYDDAS to ON which is probably why you weren't able to reproduce.  So to restat the case.  Forcing defaults via 
#  make __MAKE_CONF=/dev/null -C /usr/ports/lang/yap-devel -DUSE_K8 
builds and runs. This means that 

# make __MAKE_CONF=/dev/null -C /usr/ports/lang/yap-devel -DUSE_K8 showconfig
===> The following configuration options are available for yap-devel-6.3.3_6:
     DOCS=on: Build and/or install documentation
     MYDDAS=off: Enable MySQL support

However this fails to build
# make  -C /usr/ports/lang/yap-devel -DUSE_K8 showconfig
===> The following configuration options are available for yap-devel-6.3.3_6:
     DOCS=off: Build and/or install documentation
     MYDDAS=on: Enable MySQL support

Compiles and builds but fails during package building with 
====> Compressing man pages (compress-man)
===>  Building package for yap-devel-6.3.3_6
pkg-static: Unable to access file /var/ports/usr/ports/lang/yap-devel/work/stage/usr/local/lib/Yap/odbc4pl.so: No such file or directory
*** Error code 1

And 
# find /var/ports/usr/ports/lang/yap-devel/work/ -name odbc4pl.so
returns nothing. 
(Aside, WRKDIRPREFIX=   /var/ports )

Even though we got to the point of building the package which implies a clean compile/link, I noticed
---
devel/work/stage/usr/local/lib/Yap/startup.yss -p chr=. -q -f /var/ports/usr/ports/lang/yap-devel/work/yap-6.3.3/packages/chr/chr_swi_bootstrap.pl \
              -g "chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt" \
              -t 'halt(1)'
     ERROR!!  (/var/ports/usr/ports/lang/yap-devel/work/stage/usr/local/share/Yap/unix.pl:44).
     SYSTEM ERROR- dlopen error for unix: Shared object "unix" not found, required by "yap"

---
which may have a bearing?
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-06-10 17:49:07 UTC
A commit references this bug:

Author: danilo
Date: Sat Jun 10 17:48:23 UTC 2017
New revision: 443108
URL: https://svnweb.freebsd.org/changeset/ports/443108

Log:
  - Disable myddas explicitly. This avoids a linking problem when mysqlclient is installed.

  PR:		219832

Changes:
  head/lang/yap/Makefile
Comment 5 Walter Schwarzenfeld 2018-01-13 23:14:54 UTC
Forgotten to close?
Comment 6 dewayne 2018-01-14 23:57:29 UTC
(In reply to w.schwarzenfeld from comment #5)
Yes.  Should be closed.  There is a general inconsistency amoungst ports of whether to test for the existence of something (convenience for the installation build), or to require "it" to be explicit (convenience for package builder, different target environment assumptions).