Bug 168617 - emulators/wine: build failing if libinotify installed
Summary: emulators/wine: build failing if libinotify installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-03 01:40 UTC by Barbara
Modified: 2020-04-11 20:45 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (317 bytes, patch)
2012-06-03 01:40 UTC, Barbara
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara 2012-06-03 01:40:09 UTC
Wine build is failing for me if devel/libinotify is installed with the following error:

cc -o wineserver async.o atom.o change.o class.o clipboard.o completion.o console.o debugger.o device.o directory.o event.o fd.o file.o handle.o hook.o mach.o mailslot.o main.o mapping.o mutex.o named_pipe.o object.o process.o procfs.o ptrace.o queue.o region.o registry.o request.o semaphore.o serial.o signal.o snapshot.o sock.o symlink.o thread.o timer.o token.o trace.o unicode.o user.o window.o winstation.o         -L../libs/wine -lwine ../libs/port/libwine_port.a -L/usr/local/lib  -Wl,--rpath,\$ORIGIN/../libs/wine
change.o: In function `inotify_add_dir':
change.c:(.text+0x4ac): undefined reference to `inotify_add_watch'
change.o: In function `free_inode':
change.c:(.text+0x781): undefined reference to `inotify_rm_watch'
change.o: In function `req_read_directory_changes':
change.c:(.text+0x12a9): undefined reference to `inotify_init'
./tools/widl/widl -I. -I. -I../include -I../include    -h -o d3d10_1.h d3d10_1.idl
gmake[1]: *** [wineserver] Error 1
gmake[1]: Leaving directory `/usr/ports/emulators/wine/work/wine-1.4/server'


I fixed the build preventing configure to detect it.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-03 12:21:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gerald

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 gerald 2012-06-23 20:31:37 UTC
Thanks for the report and proposed workaround.  I understand the
issue, though hope to find a better solution that I will be able
to submit upstream.

The problem really is that the include files are found, but the
associated library is not included when linking.  Addressing this
looks like the better approach and it is what I'd like to see (and
will give a try this weekend).


Alternately, and in fact that is something I hope can happen as
a follow-up change, a Wine configure option --disable-inotify
would be nice.  This is useful when you want to have reproducible
builds, even in the presence of extra packages.  Is this something
you might be interested in hacking, Barbara?

Gerald
Comment 3 Gerald Pfeifer freebsd_committer freebsd_triage 2012-06-23 23:08:36 UTC
State Changed
From-To: open->feedback

Here is a patch against Wine.  Mind giving this a try?  (The patch 
is agains Wine 1.5.x which faces the same issue, but should apply 
against Wine 1.4 as well.) 

With this patch, if the libinotify library is there, it will be 
used by Wine.
Comment 4 dfilter service freebsd_committer freebsd_triage 2012-07-03 22:50:43 UTC
gerald      2012-07-03 21:50:29 UTC

  FreeBSD ports repository

  Added files:
    emulators/wine/files patch-libinotify 
  Log:
  Unconditionally prevent the detection of libinotify which currently
  fails the build on FreeBSD.
  
  PR:             168617
  Reported by:    Barbara <barbara.xxx1975@libero.it>
  
  Revision  Changes    Path
  1.1       +12 -0     ports/emulators/wine/files/patch-libinotify (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Gerald Pfeifer freebsd_committer freebsd_triage 2012-12-14 19:36:35 UTC
State Changed
From-To: feedback->closed

No feedback for five months, patch of mine applied, and no reports by 
other users, thus closing this out. 

Thanks for the nice report, that was good input!
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2014-03-08 15:59:15 UTC
There is same bug in port emulators/wine-devel.
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-10-12 05:55:21 UTC
A commit references this bug:

Author: gerald
Date: Mon Oct 12 05:54:57 UTC 2015
New revision: 399113
URL: https://svnweb.freebsd.org/changeset/ports/399113

Log:
  Unconditionally prevent the detection of libinotify which fails the
  build in the presence of devel/libinotify and is not really necessary.

  PR:		202564, 168617

Changes:
  head/emulators/wine-devel/files/patch-libinotify
Comment 8 commit-hook freebsd_committer freebsd_triage 2019-04-28 22:45:07 UTC
A commit references this bug:

Author: gerald
Date: Sun Apr 28 22:44:17 UTC 2019
New revision: 500375
URL: https://svnweb.freebsd.org/changeset/ports/500375

Log:
  Update to Wine 4.7.  This includes the following changes:
   - Support for builtin libraries in PE format even on Unix.
   - More implementation of the Debug Engine DLL.
   - Support for the Command Link standard control.
   - Improved Edit control sizing in CJK locales.
   - Various bug fixes.

  Officially this also brought an updated version of the Mono engine,
  which we got two days ago via revision 500271 already, though.

  My local patch files/patch-libinotify is not required any longer [1]
  (and would not apply to begin with) after the following upstream commit:

    commit 07c2e8581a2745725cd7ce4282eedb9a8084a1e4
    Author: Damjan Jovanovic <damjan.jov@gmail.com>
    Date:   Sat Apr 20 15:14:53 2019 +0200

      configure: Link wineserver to libinotify if necessary.

      Outside Linux, wineserver fails to link when sys/inotify.h
      is present, as it tries to find inotify symbols in libc,
      which doesn't have them. The inotify symbols are in libinotify.so.
      Detect it properly, and link to it where available.

      Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
      Signed-off-by: Alexandre Julliard <julliard@winehq.org>

  PR:		202564 [1], 168617 [1]

Changes:
  head/emulators/wine-devel/distinfo
  head/emulators/wine-devel/files/patch-libinotify
Comment 9 Eirik Oeverby 2020-04-11 20:45:47 UTC
This seems to be an issue with both wine ports even now, wine 5.0 and 5.5, respectively, gives:

/usr/local/bin/ld: change.o: in function `free_inode':
change.c:(.text+0x135): undefined reference to `inotify_rm_watch'
/usr/local/bin/ld: change.o: in function `inotify_add_dir':
change.c:(.text+0xaef): undefined reference to `inotify_add_watch'
/usr/local/bin/ld: change.o: in function `req_read_directory_changes':
change.c:(.text+0x1b91): undefined reference to `inotify_init'
collect2: error: ld returned 1 exit status

This is on -CURRENT.