Bug 249516 - [NEW PORT] devel/linux-c7-libusb: package provides a way for applications to access USB devices
Summary: [NEW PORT] devel/linux-c7-libusb: package provides a way for applications to...
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: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-21 20:36 UTC by Martin Filla
Modified: 2021-09-17 11:00 UTC (History)
2 users (show)

See Also:


Attachments
linux-c7-libusb.shar (1.77 KB, text/plain)
2020-09-21 20:36 UTC, Martin Filla
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Filla 2020-09-21 20:36:49 UTC
Created attachment 218160 [details]
linux-c7-libusb.shar

Hi,
this package is for linux emulation for support application with dependent
for libusb.
Thank you M.
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2020-09-22 08:37:04 UTC
Linux libusb doesn't work on FreeBSD.  There's devel/linux_libusb which compiles FreeBSD libusb for Linux.  Can you give that port a try?
Comment 2 Martin Filla 2020-09-22 09:15:47 UTC
(In reply to Tijl Coosemans from comment #1)

I try for CCS9.3.0.00012_linux-x64 studio but still have 
missing dependency
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-09-22 13:42:11 UTC
A commit references this bug:

Author: tijl
Date: Tue Sep 22 13:41:55 UTC 2020
New revision: 549593
URL: https://svnweb.freebsd.org/changeset/ports/549593

Log:
  - Build 64-bit version on amd64.
  - Add run dependency on linux_base.
  - Remove -march from CFLAGS because gcc 4.8 does not know recent cpu types.

  PR:		249516

Changes:
  head/devel/linux_libusb/Makefile
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2020-09-22 14:50:39 UTC
I've committed an update to devel/linux_libusb.  Can you give that a try?
Comment 5 Alex S 2020-09-26 14:07:45 UTC
I'm not exactly sure COMPAT_32BIT does there, but it definitely does not build the 32-bit version of the library.
Comment 6 Alex S 2020-09-26 14:08:05 UTC
(In reply to Alex S from comment #5)

* what
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-09-26 21:18:38 UTC
A commit references this bug:

Author: tijl
Date: Sat Sep 26 21:18:34 UTC 2020
New revision: 550227
URL: https://svnweb.freebsd.org/changeset/ports/550227

Log:
  Add a direct build dependency on linux_base instead of relying on devtools
  to pull it in.  This guarantees that the version constraint set in
  Mk/Uses/linux.mk is taken into account.

  Compile with --sysroot=${LINUXBASE} such that gcc doesn't pick up headers
  from /usr.

  Build the 32 bit library on amd64 with -m32 such that it's actually a 32 bit
  library.  This must have become broken long time ago when 64 bit linux
  support was added and the compiler became 64 bit. [1]

  PR:		249516
  Reported by:	Alex S <iwtcex@gmail.com> [1]

Changes:
  head/devel/linux_libusb/Makefile
Comment 8 Alex S 2020-09-27 05:09:46 UTC
(In reply to commit-hook from comment #7)

Thank you, Tijl. Do you think it's safe to also symlink libusb-1.0.so.0 to libusb.so.3? The [FreeBSD libusb] code seems to suggest so at least.
Comment 9 Tijl Coosemans freebsd_committer freebsd_triage 2020-09-27 10:08:36 UTC
(In reply to Alex S from comment #8)
Yes, it should work.  Do you have a way to test it?
Comment 10 Alex S 2020-09-27 13:54:53 UTC
(In reply to Tijl Coosemans from comment #9)

> Do you have a way to test it?

Well, Linux Steam + Steam controller. In fact, I already played with it a bit (both literally and figuratively) a while ago, there were some annoying crashes:

*** Error in `/home/steam/.steam/steam/ubuntu12_32/steam': double free or corruption (out): 0x2d9796d0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x79aad)[0x217a3aad]
/lib/libusb.so.3(libusb20_dev_free+0x26)[0x21951206]
/lib/libusb.so.3(libusb_unref_device+0x53)[0x2194bd53]
/lib/libusb.so.3(libusb_free_device_list+0x3b)[0x2194bf6b]
...

and the whole thing is incredibly niche, so I put this on the back burner.

(In case you don't mind being utterly bored, my personal list of not very exciting Steam issues is available at https://github.com/shkhln/linuxulator-steam-utils/wiki/Home-improvement-ideas. Mostly points to this bug tracker anyway.)
Comment 11 commit-hook freebsd_committer freebsd_triage 2020-09-27 15:24:16 UTC
A commit references this bug:

Author: tijl
Date: Sun Sep 27 15:24:00 UTC 2020
New revision: 550282
URL: https://svnweb.freebsd.org/changeset/ports/550282

Log:
  Remove libusb.so symbolic link because it belongs in a -devel package.
  Add libusb-1.0.so.0 symbolic link because FreeBSD libusb implements that
  API too.

  PR:		249516
  Reported by:	Alex S <iwtcex@gmail.com>

Changes:
  head/devel/linux_libusb/Makefile
Comment 12 Martin Filla 2020-09-27 20:47:37 UTC
(In reply to Tijl Coosemans from comment #4)
this missing dependency is fixed for ccs ide.
Thank you M.F