Bug 250010 - multimedia/shotcut: fails to build "spatialmedia/constants.h:38:12: fatal error: 'endian.h' file not found"
Summary: multimedia/shotcut: fails to build "spatialmedia/constants.h:38:12: fatal err...
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: freebsd-ports-bugs (Nobody)
URL: https://github.com/mltframework/shotc...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-30 17:26 UTC by Vladimir Druzenko
Modified: 2020-10-01 05:31 UTC (History)
1 user (show)

See Also:


Attachments
Fix build error (1.13 KB, patch)
2020-09-30 17:56 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2020-09-30 17:26:19 UTC
12.1-p10 amd64.
===========================================================================
--- box.o ---
In file included from spatialmedia/box.cpp:23:
spatialmedia/constants.h:38:12: fatal error: 'endian.h' file not found
#  include <endian.h>
           ^~~~~~~~~~
1 error generated.
*** [box.o] Error code 1
===========================================================================
Upstream issue with patch is here: https://github.com/mltframework/shotcut/issues/915
===========================================================================
multimedia/shotcut/files/patch-src_spatialmedia_constants.h:
--- src/spatialmedia/constants.h.orig
+++ src/spatialmedia/constants.h
@@ -34,7 +34,7 @@
 #  define htole64(x) qtoLittleEndian(x)
 #  define be64toh(x) qFromBigEndian(x)
 #  define le64toh(x) qFromLittleEndian(x)
-#else
+#elif !defined(__FreeBSD__)
 #  include <endian.h>
 #endif

===========================================================================
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2020-09-30 17:30:37 UTC
It was fixed in upstream in 5 minutes after reported!
Commit: 0391368
https://github.com/mltframework/shotcut/commit/0391368b92ea392f38f905afcc723960be2a84d9
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-30 17:36:06 UTC
(In reply to VVD from comment #0)
Thanks for reporting!

It builds for me in poudriere in 12.1 amd64 with all options ON. In which cases this fail?
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2020-09-30 17:56:38 UTC
Created attachment 218437 [details]
Fix build error
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2020-09-30 17:57:43 UTC
(In reply to Fernando Apesteguía from comment #2)
I have all options on too.
It's live system.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2020-09-30 18:03:51 UTC
(In reply to Fernando Apesteguía from comment #2)
Do you have endian.h somewhere in /usr/include or in /usr/local/include?
Or -I/usr/include/sys build option?
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-09-30 18:21:45 UTC
A commit references this bug:

Author: fernape
Date: Wed Sep 30 18:20:56 UTC 2020
New revision: 550729
URL: https://svnweb.freebsd.org/changeset/ports/550729

Log:
  multimedia/shotcut: Fix build. Add missing patch.

  This patch was missing from r550683

  PR:	250010
  Reported by:	vvd@unislabs.com

Changes:
  head/multimedia/shotcut/files/
  head/multimedia/shotcut/files/patch-src_spatialmedia_constants.h
Comment 7 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-30 18:22:30 UTC
(In reply to VVD from comment #5)

My bad.

I skipped the previous release (20.09.13) for which I had a equivalent patch and when updating to the latest release, I forgot to svn add files/

Thanks a lot for pointing this out.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2020-09-30 18:42:22 UTC
(In reply to Fernando Apesteguía from comment #7)
BTW, you don't need to include endian.h. My version work too.
Comment 9 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-01 05:31:33 UTC
(In reply to VVD from comment #8)
Sure.

I just committed the one I had already "tested" :)

The good thing is that since you reported this upstream, it will be included in the next release.

Cheers.