Bug 232799 - www/netsurf: fails to build "Unable to find library for: utf8proc"
Summary: www/netsurf: fails to build "Unable to find library for: utf8proc"
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-29 23:54 UTC by Walter Schwarzenfeld
Modified: 2019-09-16 19:09 UTC (History)
3 users (show)

See Also:
neel: maintainer-feedback+


Attachments
svn-diff-libutf8proc (177 bytes, text/plain)
2019-09-14 23:40 UTC, Walter Schwarzenfeld
no flags Details
svn-diff-netsurf (648 bytes, patch)
2019-09-14 23:41 UTC, Walter Schwarzenfeld
no flags Details | Diff
patch-textproc-Makefile (307 bytes, patch)
2019-09-14 23:42 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-libutf8proc_v2 (1.92 KB, patch)
2019-09-14 23:44 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-libutf8proc_v3 (1.98 KB, patch)
2019-09-15 00:11 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-netsurf_v2 (655 bytes, patch)
2019-09-15 00:13 UTC, Walter Schwarzenfeld
no flags Details | Diff
Neel's www/netsurf Makefile diff (662 bytes, patch)
2019-09-15 00:15 UTC, Neel Chauhan
no flags Details | Diff
Neel's textproc/libutf8proc(-netsurf) Makefile diff (2.00 KB, patch)
2019-09-15 00:15 UTC, Neel Chauhan
no flags Details | Diff
svn-diff-libutf8proc_v4 (1.98 KB, patch)
2019-09-15 00:16 UTC, Walter Schwarzenfeld
no flags Details | Diff
patch-to-build-with-textproc/utf8proc (1.45 KB, patch)
2019-09-15 10:14 UTC, Kurt Jaeger
pi: maintainer-approval?
Details | Diff
patch-netsurf-Makefile (471 bytes, patch)
2019-09-15 10:57 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-netsurf-Makefile (807 bytes, patch)
2019-09-15 11:00 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Schwarzenfeld freebsd_triage 2018-10-29 23:54:28 UTC
netsurf fails to build (on 11.2-RELEASE-amd64) with:
===>  Configuring for netsurf-3.8
===>  Building for netsurf-3.8
gmake[2]: Entering directory '/ram/usr/ports/www/netsurf/work/netsurf-3.8'
M.CONFIG: JPEG (libjpeg)	enabled       (NETSURF_USE_JPEG := YES)
M.CONFIG: PDF export (haru)	disabled      (NETSURF_USE_HARU_PDF := NO)
M.CONFIG: glibc internal iconv	enabled       (NETSURF_USE_LIBICONV_PLUG := YES)
M.CONFIG: Javascript (Duktape)	enabled       (NETSURF_USE_DUKTAPE := YES)
PKG.CNFG: CSS (libcss)	enabled
PKG.CNFG: DOM (libdom)	enabled
PKG.CNFG: nsutils (libnsutils)	enabled
PKG.CNFG: utf8proc (libutf8proc)	failed
Makefile:524: *** Unable to find library for: utf8proc (libutf8proc).  Stop.
gmake[2]: Leaving directory '/ram/usr/ports/www/netsurf/work/netsurf-3.8'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-10-29 23:56:26 UTC
Builds if I change

--- Makefile.orig       2018-10-29 23:43:38 UTC
+++ Makefile
@@ -521,10 +521,9 @@ $(eval $(call feature_switch,DUKTAPE,Jav
 $(eval $(call pkg_config_find_and_add,libcss,CSS))
 $(eval $(call pkg_config_find_and_add,libdom,DOM))
 $(eval $(call pkg_config_find_and_add,libnsutils,nsutils))
-$(eval $(call pkg_config_find_and_add,libutf8proc,utf8proc))
 
 # Common libraries without pkg-config support
-LDFLAGS += -lz
+LDFLAGS += -lz -lutf8proc
 
 # Optional libraries with pkgconfig
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-10-30 00:20:53 UTC
Sorry, my error no bug.
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-10-30 23:03:15 UTC
Seems I was puzzled yesterday. The problem does exist.
Also it does not find
<libutf8proc/utf8proc.h> in utils/idna.c

I added 
${REINPLACE_CMD} 's|libutf8proc/utf8proc.h|utf8proc.h|g' ${WRKSRC}/utils/idna.c
to the Makefile.
Comment 4 Neel Chauhan 2018-10-31 01:16:07 UTC
No error on my part (without your workaround). FreeBSD 11.2-RELEASE on a HP EliteBook 1040 G3 (i7-6600U, 16GB DDR4, 256GB M.2 SSD, QHD).

/bin/mkdir -p /usr/ports/www/netsurf/work/stage/usr/local/share/applications
/bin/mkdir -p /usr/ports/www/netsurf/work/stage/usr/local/share/pixmaps
install  -m 0644 /usr/ports/www/netsurf/work/netsurf-3.8/frontends/gtk/res/netsurf-gtk.desktop  /usr/ports/www/netsurf/work/stage/usr/local/share/applications
install  -m 0644 /usr/ports/www/netsurf/work/netsurf-3.8/frontends/gtk/res/netsurf.xpm  /usr/ports/www/netsurf/work/stage/usr/local/share/pixmaps
====> Compressing man pages (compress-man)
===>  Installing for netsurf-3.8
===>  Checking if netsurf already installed
===>   Registering installation for netsurf-3.8
Installing netsurf-3.8...
===>  Cleaning for nsgenbind-0.6
===>  Cleaning for netsurf-buildsystem-1.7
===>  Cleaning for flex-2.6.4
===>  Cleaning for help2man-1.47.8
===>  Cleaning for p5-Locale-gettext-1.07
===>  Cleaning for gmake-4.2.1_2
===>  Cleaning for netsurf-3.8
root@xb3:/usr/ports/www/netsurf #

What's your FreeBSD version? Are your ports and packages updated? Do you have libutf8proc installed?
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-10-31 02:04:51 UTC
Seems it is the old conflict
pkg which /usr/local/lib/libutf8proc.so.2
/usr/local/lib/libutf8proc.so.2 was installed by package utf8proc-2.1.0

pkg info -r utf8proc
utf8proc-2.1.0:
	subversion-1.10.3
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-10-31 02:06:46 UTC
Ports updated, version freebsd-11.2-RELEASE-amd64.
Comment 7 Christopher 2019-06-13 03:36:08 UTC
I can confirm this bug as I just tried to install this port on two different computers and both error out with:

Makefile:524: *** Unable to find library for: utf8proc (libutf8proc).  Stop.
gmake[2]: Leaving directory '/usr/ports/www/netsurf/work/netsurf-3.8'
===> Compilation failed unexpectedly.

I do have libutf8proc installed:

Name           : utf8proc
Version        : 2.2.0
Installed on   : Mon Mar  4 00:40:19 2019 EST
Origin         : textproc/utf8proc
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : devel textproc
Licenses       : MIT
Maintainer     : hrs@FreeBSD.org
WWW            : https://juliastrings.github.io/utf8proc/
Comment        : UTF-8 processing library
Options        :
DOCS           : on
Shared Libs provided:
	libutf8proc.so.2
Annotations    :
	FreeBSD_version: 1200086

Both computers are running:
FreeBSD 12.0-RELEASE-p4 amd64

Everything installed on these computers were via ports (portmaster)
Comment 8 Kurt Jaeger freebsd_committer 2019-09-12 19:22:40 UTC
This does not happen if the port is build using poudriere (see PR#240336)
Comment 9 Walter Schwarzenfeld freebsd_triage 2019-09-12 19:31:33 UTC
Yes, but the problem also exist with official packages.
Comment 10 Walter Schwarzenfeld freebsd_triage 2019-09-12 19:34:24 UTC
[11/16] Extracting libnspsl-0.1.5: 100%
[12/16] Installing libnsutils-0.0.5...
[12/16] Extracting libnsutils-0.0.5: 100%
[12/16] Installing utf8proc-2.4.0...
pkg: utf8proc-2.4.0 conflicts with libutf8proc-1.3.1.3 (installs files into the same place).  Problematic file: /usr/local/lib/libutf8proc.so
Comment 11 Walter Schwarzenfeld freebsd_triage 2019-09-13 11:06:48 UTC
The libutf8proc port is only used by netsurf. Where is the problem to renome  the libutf8proc*,so files
in e.g. libulntf8proc1*.xo?
Comment 12 Walter Schwarzenfeld freebsd_triage 2019-09-14 23:40:52 UTC
Created attachment 207493 [details]
svn-diff-libutf8proc
Comment 13 Walter Schwarzenfeld freebsd_triage 2019-09-14 23:41:25 UTC
Created attachment 207494 [details]
svn-diff-netsurf
Comment 14 Walter Schwarzenfeld freebsd_triage 2019-09-14 23:42:14 UTC
Created attachment 207495 [details]
patch-textproc-Makefile

The three patches are my solution for the problem.
Comment 15 Walter Schwarzenfeld freebsd_triage 2019-09-14 23:44:37 UTC
Created attachment 207496 [details]
svn-diff-libutf8proc_v2

Something goin wrong with upload.
Comment 16 Neel Chauhan 2019-09-14 23:47:34 UTC
Thank you so much for these patches.

However, I have one suggestion; Instead of naming the renamed library libutf8proc1, it would be more clear to other packages if it was named something like libutf8proc_netsurf to make it more clear its a Netsurf library.
Comment 17 Walter Schwarzenfeld freebsd_triage 2019-09-14 23:53:46 UTC
It's a base for change. Change it if you need.

I renamed the port cause of libutf8proc.pc (I saw no other way).
Comment 18 Walter Schwarzenfeld freebsd_triage 2019-09-15 00:11:44 UTC
Created attachment 207499 [details]
svn-diff-libutf8proc_v3
Comment 19 Walter Schwarzenfeld freebsd_triage 2019-09-15 00:13:32 UTC
Created attachment 207500 [details]
svn-diff-netsurf_v2

Change it to libutf8proc_netsurf.
Comment 20 Neel Chauhan 2019-09-15 00:15:00 UTC
Created attachment 207501 [details]
Neel's www/netsurf Makefile diff

I'll go with renaming the port to libutf8proc-netsurf, not libutf8proc1.
Comment 21 Neel Chauhan 2019-09-15 00:15:40 UTC
Created attachment 207502 [details]
Neel's textproc/libutf8proc(-netsurf) Makefile diff
Comment 22 Walter Schwarzenfeld freebsd_triage 2019-09-15 00:16:09 UTC
Created attachment 207503 [details]
svn-diff-libutf8proc_v4

Overlooked one change in pkg-plist.
Comment 23 Walter Schwarzenfeld freebsd_triage 2019-09-15 00:18:56 UTC
Ok, I obsoleted my patches.
Comment 24 Kurt Jaeger freebsd_committer 2019-09-15 09:34:49 UTC
testbuilds@work
Comment 25 Kurt Jaeger freebsd_committer 2019-09-15 09:41:43 UTC
Fails to build:

gmake[1]: Entering directory '/wrkdirs/usr/ports/www/netsurf/work/netsurf-3.9'
M.CONFIG: JPEG (libjpeg)        enabled       (NETSURF_USE_JPEG := YES)
M.CONFIG: PDF export (haru)     disabled      (NETSURF_USE_HARU_PDF := NO)
M.CONFIG: glibc internal iconv  enabled       (NETSURF_USE_LIBICONV_PLUG := YES)
M.CONFIG: Javascript (Duktape)  enabled       (NETSURF_USE_DUKTAPE := YES)
PKG.CNFG: CSS (libcss)  enabled
PKG.CNFG: DOM (libdom)  enabled
PKG.CNFG: nsutils (libnsutils)  enabled
PKG.CNFG: utf8proc (libutf8proc)        failed
Makefile:531: *** Unable to find library for: utf8proc (libutf8proc).  Stop.
gmake[1]: Leaving directory '/wrkdirs/usr/ports/www/netsurf/work/netsurf-3.9'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Any ideas ?
Comment 26 Kurt Jaeger freebsd_committer 2019-09-15 09:43:03 UTC
what's the difference between textproc/utf8proc and textproc/libutf8proc that www/netsurf can't use the former ?
Comment 27 Walter Schwarzenfeld freebsd_triage 2019-09-15 09:51:10 UTC
Complete different files, libutf8proc has the double size of utf8proc.
Comment 29 Kurt Jaeger freebsd_committer 2019-09-15 10:14:32 UTC
Created attachment 207506 [details]
patch-to-build-with-textproc/utf8proc

This builds and runs (on 12.0-amd64) and the patch looks much simpler -- and the libutf8proc port is no longer needed.
Comment 30 Walter Schwarzenfeld freebsd_triage 2019-09-15 10:57:17 UTC
Created attachment 207507 [details]
patch-netsurf-Makefile
Comment 31 Walter Schwarzenfeld freebsd_triage 2019-09-15 11:00:40 UTC
Created attachment 207508 [details]
svn-diff-netsurf-Makefile

Was the wrong one.
Comment 32 Walter Schwarzenfeld freebsd_triage 2019-09-15 11:26:48 UTC
Comment on attachment 207508 [details]
svn-diff-netsurf-Makefile

Obsolete the patch. Finds the wrong library.
Comment 33 Neel Chauhan 2019-09-16 18:39:00 UTC
Comment on attachment 207506 [details]
patch-to-build-with-textproc/utf8proc

Looks good to me.
Comment 34 commit-hook freebsd_committer 2019-09-16 19:09:33 UTC
A commit references this bug:

Author: pi
Date: Mon Sep 16 19:08:46 UTC 2019
New revision: 512181
URL: https://svnweb.freebsd.org/changeset/ports/512181

Log:
  www/netsurf: fix build to use textproc/utf8proc instead of .../libutf8proc

  - this fixes a install conflict with devel/subversion

  PR:		232799
  Approved by:	Neel Chauhan <neel@neelc.org> (maintainer)
  Reviewed by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>

Changes:
  head/www/netsurf/Makefile
  head/www/netsurf/files/patch-utils_idna.c
Comment 35 Kurt Jaeger freebsd_committer 2019-09-16 19:09:42 UTC
Committed, thanks!