Opened 4 years ago

Last modified 2 years ago

#59904 assigned defect

gnutls @3.6.6: fatal error: 'nettle/nettle-stdint.h' file not found

Reported by: homer3018 Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: cooljeanius (Eric Gallager)
Port: gnutls

Description

Hello there. I'm trying to get some ports installed in order to build a GitHub project (Darktable) on my Mac, but it seems that I can't get gnutls installed properly. It always ends up like that :

$ sudo port clean gnutls
--->  Cleaning gnutls
$ sudo port -t install gnutls
Warning: cltversion: The Command Line Tools are installed, but MacPorts cannot determine the version.
Warning: cltversion: For a possible fix, please see: https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt
--->  Computing dependencies for gnutls
--->  Fetching distfiles for gnutls
--->  Verifying checksums for gnutls
--->  Extracting gnutls
Warning: The following existing file was hidden from the build system by trace mode:
  /private/var/select/sh
--->  Applying patches to gnutls
Warning: The following existing file was hidden from the build system by trace mode:
  /private/var/select/sh
--->  Configuring gnutls
Warning: The following existing files were hidden from the build system by trace mode:
  /opt/local/bin/ar
  /opt/local/bin/bison
  /opt/local/bin/gmkdir
  /opt/local/bin/gsed
  /opt/local/bin/lipo
  /opt/local/bin/nm
  /opt/local/bin/nmedit
  /opt/local/bin/otool
  /opt/local/bin/ranlib
  /opt/local/bin/strip
  /opt/local/lib/pkgconfig/glib-2.0.pc
  /opt/local/lib/pkgconfig/gobject-2.0.pc
  /private/var/select/sh
--->  Building gnutls
Warning: The following existing files were hidden from the build system by trace mode:
  /opt/local/bin/ar
  /opt/local/bin/lipo
  /opt/local/bin/ranlib
  /private/var/select/sh
Error: Failed to build gnutls: command execution failed
Error: See /opt/local/var/macports/logs/_Users_seb_ports_devel_gnutls/gnutls/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port gnutls failed

I'm not familiar with the edge cases of MacPorts and only use it so I can build other projects, so I'm mainly following instructions. In the case of Darktable, you can find them there (in case there is a specific setting that is causing this):

https://github.com/darktable-org/darktable/blob/master/packaging/macosx/BUILD.txt

I'm running MacOS 10.15.2 Catalina and MacPorts 2.6.2. I'm attaching the log file (that may contain several attempts to build the port).

Please feel free to reach should you need more information. Any help would be appreciated.

Thanks ahead of time for your support.

Attachments (1)

main.log (900.2 KB) - added by homer3018 4 years ago.
Log file

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by homer3018

Attachment: main.log added

Log file

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to Schamschula
Status: newassigned
Summary: gnutls @3.6.6 : Failed to build gnutls: command execution failedgnutls @3.6.6: fatal error: 'nettle/nettle-stdint.h' file not found

The log shows that the error is:

:info:build In file included from gost/gost28147.c:40:
:info:build gost/nettle-write.h:40:10: fatal error: 'nettle/nettle-stdint.h' file not found
:info:build #include <nettle/nettle-stdint.h>
:info:build          ^~~~~~~~~~~~~~~~~~~~~~~~
:info:build 1 error generated.

I see that you are using the latest nettle 3.5.1, but are building gnutls 3.3.6. This is out of date, possibly to such a degree that it is incompatible with the latest nettle. The version of gnutls currently in MacPorts is 3.6.11.1.

I see that you are building gnutls from a local Portfile in /Users/seb/ports/devel/gnutls. Try removing that Portfile and building our copy of the Portfile from the standard location instead.

I see that the darktable build instructions advise you to create this local ports tree and patch a number of our Portfiles. Obviously that's not how we intended for MacPorts to be used so we cannot recommend doing that. If you are not using it for your own Portfile development, consider removing or moving aside your entire /Users/seb/ports directory or removing the corresponding entry from sources.conf and see if that resolves the issues you are experiencing. You may need to uninstall and reinstall any ports that you modified by following their instructions.

Also, note that we have darktable in MacPorts (sudo port install darktable); you don't need to build it from source yourself nor do any patching of our Portfiles to install it.

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

I have not looked at all of the patches that the darktable build instructions propose applying, but in general the developers of darktable should contribute them back to the developers of the respective dependencies; please encourage them to do that. For example, the patch for GraphicsMagick appears to modify the code so that clock_gettime is detected at runtime in addition to at build time, which should fix crashes when GraphicsMagick was compiled with the 10.12 SDK or later but run on 10.11 or earlier. Great! They should send that to the developers of GraphicsMagick so that it can be included in the next version. Same with ImageMagick: their patch removes a spurious hardcoded link to libstdc++. That needs to go to the developers of ImageMagick.

comment:3 Changed 4 years ago by homer3018

Hi Ryan and thanks for replying !

I'll try and answer your comments in order.

I see that you are using the latest nettle 3.5.1, but are building gnutls 3.3.6. This is out of date, possibly to such a degree that it is incompatible with the latest nettle. The version of gnutls currently in MacPorts is 3.6.11.1.

I have no idea why It's trying to install v 3.3.6 instead of 3.6.11.1, Trying

$ sudo port install gnutls @3.6.11.1
Warning: cltversion: The Command Line Tools are installed, but MacPorts cannot determine the version.
Warning: cltversion: For a possible fix, please see: https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt
--->  Computing dependencies for gnutls
--->  Building gnutls
Error: Failed to build gnutls: command execution failed
Error: See /opt/local/var/macports/logs/_Users_seb_ports_devel_gnutls/gnutls/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port gnutls failed

ends up the same way.

I see that you are building gnutls from a local Portfile in /Users/seb/ports/devel/gnutls.

I have no idea why it is like so.

Try removing that Portfile and building our copy of the Portfile from the standard location instead.

I'm sorry but I have no idea about how to do that either.

I'm not doing any Portfiles development so I'm ok with trying it all again from scratch if needed, I'd just need some guidance about how to proceed from here. Maybe as you mentioned reverse the changes in macports.conf, variants.conf and sources.conf ?

Maybe this is all some consequences when I upgraded to 10.15 and to MacPorts 2.6.2 ?

As for contributing back to the port devs I'll make sure I'll start this conversation soon enough, it might just be easier for everyone.

Also, note that we have darktable in MacPorts (sudo port install darktable); you don't need to build it from source yourself nor do any patching of our Portfiles to install it.

I'm a lot more familiar with Git so this is probably why I naturally lean toward it. I have no issues building it as often as needed. I'm just having this issue now (which might be related to the 10.15 upgrade along with migrating MacPorts to 2.6.2) but otherwise it's all good. I'm running Darktable 3.1.0 which is the dev version of the 3.0.0 release while the ports still seat at 2.6.3 which was the last release. Still I didn't even know there was a port so thank you for letting me know, and also for helping me out :)

comment:4 Changed 4 years ago by homer3018

mmmh I see. Indeed I have some stuff in /Users/seb/ports/devel/gnutls, that are coming from the Darktable instructions, and this is where the v3.6.6 is coming from.

I've tried (naively) to rename that folder and reinstall it, but it won't do it complaining that it can't access the folder. How can I told MacPorts that I don't want this folder anymore, I first want to install (the latest version) it normally and then path it again. I'm pretty sure that v3.6.6 is the version that was the latest when I followed the Darktable build instructions for the very first time.

Thanks for helping out ! much appreciated.

comment:5 in reply to:  3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to homer3018:

I see that you are using the latest nettle 3.5.1, but are building gnutls 3.3.6. This is out of date, possibly to such a degree that it is incompatible with the latest nettle. The version of gnutls currently in MacPorts is 3.6.11.1.

I have no idea why It's trying to install v 3.3.6 instead of 3.6.11.1

Presumably because the version of gnutls in the custom ports that darktable provided to you is 3.3.6, presumably because that was the current version at the time that they created their modified ports.

Trying

$ sudo port install gnutls @3.6.11.1

ends up the same way.

That's correct. sudo port install does not pay any attention to any version number that you might specify. MacPorts can only install the one and only version of a port that exists in the ports tree (or, in your case, since you have multiple ports trees—the modified darktable one and the official MacPorts one—the first port it finds).

I see that you are building gnutls from a local Portfile in /Users/seb/ports/devel/gnutls.

I have no idea why it is like so.

Presumably because you followed the instructions on the darktable web site that told you to set up /Users/seb/ports with their specially modified ports.

Try removing that Portfile and building our copy of the Portfile from the standard location instead.

I'm sorry but I have no idea about how to do that either.

Delete the directory /Users/seb/ports. Remove references to it from sources.conf. Undo any other changes the darktable web site told you to make to your MacPorts installation. Finally, run sudo port install darktable.

comment:6 Changed 2 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.