Bug 238331 - net/openvswitch: Conflicts with libc (uuid_to_string(2))
Summary: net/openvswitch: Conflicts with libc (uuid_to_string(2))
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Neel Chauhan
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-06-05 06:07 UTC by Ian Campbell
Modified: 2021-03-08 01:39 UTC (History)
3 users (show)

See Also:
nc: maintainer-feedback+
nc: merge-quarterly+


Attachments
openvswitch 2.11.1 static patch (2.56 KB, text/plain)
2019-06-05 11:21 UTC, Nikola Kolev
no flags Details
Simpler patch to just rename the conflicting function (608 bytes, patch)
2021-02-18 22:39 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Campbell 2019-06-05 06:07:55 UTC
I recently tried to install OpenvSwitch on FreeBSD 12.0-RELEASE-p4 kernel, 12.0-RELEASE-p5 userland. I found that after applying a configuration and doing a system restart my configuration does not survive. When I login to the system I do not have any vSwitch configuration applied.

After digging around on the FreeBSD forums I found this post where someone mentioned that OpenvSwitch is conflicting with libc.

https://forums.freebsd.org/threads/problem-with-openvswitch.67792/#post-428756

Based on that I started digging around in the ports tree. I found the Makefile for OpenvSwitch is setup to configure with shared libraries. I found that if I compile OpenvSwitch with static libraries the conflict with libc is resolved since the function that OpenvSwitch is trying to use is statically linked. I was able to test that after upgrading my configuration of the vSwitch(es) survives a system restart.

I did not test anymore beyond that since the lack of a kernelspace module makes this not suitable for my needs.

Here is a walkthrough of what I did;

https://forums.freebsd.org/threads/a-possible-solution-to-fix-open-vswitch.71016/?fbclid=IwAR1NdhHduR3XKTMGBc2DmuruoE1lejjIcZeVUYukurk0my48YcAWoLf9aIY
Comment 1 Nikola Kolev 2019-06-05 11:21:49 UTC
Created attachment 204836 [details]
openvswitch 2.11.1 static patch

Enable static libraries.

Poudriere logs look OK.

While here fix portlint warnings.
Comment 2 Dmitry Marakasov freebsd_committer 2021-02-18 22:38:36 UTC
- The report is not quite correct, ovs has never defined uuid_to_string(). It does, however, define uuid_from_string() which may be the cause of this problem.
- Assigning to nc@, the current maintainer.
- I've reported this to ovs-dev@openvswitch.org (should probably appear soon on https://mail.openvswitch.org/pipermail/ovs-dev/2021-February/thread.html)
- I suggest less intrusive patch which just renames the function, buildtested, needs runtime testing
Comment 3 Dmitry Marakasov freebsd_committer 2021-02-18 22:39:39 UTC
Created attachment 222565 [details]
Simpler patch to just rename the conflicting function
Comment 4 Neel Chauhan freebsd_committer 2021-02-19 00:45:46 UTC
LGTM.
Comment 5 commit-hook freebsd_committer 2021-03-08 01:38:58 UTC
A commit references this bug:

Author: nc
Date: Mon Mar  8 01:38:33 UTC 2021
New revision: 567816
URL: https://svnweb.freebsd.org/changeset/ports/567816

Log:
  net/openvswitch: Fix conflicts with libc (uuid_to_string(2))

  PR:		238331
  Submitted by:	Nikola Kolev <koue AT chaosophia DOT net>, amdmi3
  Reported by:	Ian Campbell <ianc1215 AT gmail DOT com>
  MFH:		2021Q1

Changes:
  head/net/openvswitch/Makefile
Comment 6 Neel Chauhan freebsd_committer 2021-03-08 01:39:45 UTC
Committed and MFH'd!
Comment 7 commit-hook freebsd_committer 2021-03-08 01:39:59 UTC
A commit references this bug:

Author: nc
Date: Mon Mar  8 01:39:36 UTC 2021
New revision: 567817
URL: https://svnweb.freebsd.org/changeset/ports/567817

Log:
  MFH: r567816

  net/openvswitch: Fix conflicts with libc (uuid_to_string(2))

  PR:		238331
  Submitted by:	Nikola Kolev <koue AT chaosophia DOT net>, amdmi3
  Reported by:	Ian Campbell <ianc1215 AT gmail DOT com>
  Approved by:	portmgr (bugfix blanket)

Changes:
_U  branches/2021Q1/
  branches/2021Q1/net/openvswitch/Makefile