Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.0 build error: fatal error: sfparse/sfparse.h: No such file or directory #203

Closed
barracuda156 opened this issue Feb 19, 2024 · 7 comments

Comments

@barracuda156
Copy link

nghttp3_http.c:35:10: fatal error: sfparse/sfparse.h: No such file or directory
   35 | #include "sfparse/sfparse.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [nghttp3_http.lo] Error 1
@tatsuhiro-t
Copy link
Member

Which source are you building from: git, or github zip archive, or a tar ball?

@barracuda156
Copy link
Author

Which source are you building from: git, or github zip archive, or a tar ball?

@tatsuhiro-t Tarball from GH archive: https://github.com/macports/macports-ports/blob/0a8f14ef232d5a968b000e61ee3f56f7dd41c14a/net/nghttp3/Portfile#L6-L17
(I tried to update it locally to 1.2.0 to update the port, just changing the version, the source remained the same.)

@barracuda156
Copy link
Author

I.e. this is what I used:

github.setup            ngtcp2 nghttp3 1.2.0 v
checksums               rmd160  0d227cc48e9a772723a5912d816afa23949eacd0 \
                        sha256  c6117ace6af81251ae43fa1c23fb5a604dd3d0ef58133284af1b972ff4f9e2e2 \
                        size    185519
github.tarball_from     archive

@ms178
Copy link

ms178 commented Feb 19, 2024

I can confirm the issue (seen with GCC 13.2.1 and Clang-19-git), I also see this build failure with 1.2.0. I am using the following PKGBUILD on Arch:

# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>

pkgname=libnghttp3
pkgver=1.2.0
pkgrel=2.1
pkgdesc="HTTP/3 library written in C"
url='https://github.com/ngtcp2/nghttp3'
arch=('x86_64')
license=('MIT')
provides=('libnghttp3.so')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ngtcp2/nghttp3/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('b3ffb23a90442a0eafe8bfbefbc8b4ffb5179d68a7c0b8a416a34cf04b28d7c5')

prepare() {
  cd nghttp3-${pkgver}
  autoreconf -vfi
}

build() {
  cd nghttp3-${pkgver}
  ./configure \
    --prefix=/usr
  make
}

check() {
  cd nghttp3-${pkgver}
  make check
}

package() {
  cd nghttp3-${pkgver}/lib
  make DESTDIR="${pkgdir}" install
  install -Dm644 ../COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:

@tatsuhiro-t
Copy link
Member

The archives that generated by github automatically do not work now because it does not contain files pulled from git submodule.
Please consider to download a tar archive with the prefix nghttp3- (e.g., nghttp3-1.2.0.tar.xz)

@ms178
Copy link

ms178 commented Feb 19, 2024

Thanks, that woked. I've changed the source to: source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ngtcp2/nghttp3/releases/download/v${pkgver}/nghttp3-${pkgver}.tar.gz")

I've filed https://gitlab.archlinux.org/archlinux/packaging/packages/libnghttp3/-/issues/1 to get it fixed in Arch downstream, too.

@barracuda156
Copy link
Author

@tatsuhiro-t Yes, that worked, thank you.

barracuda156 added a commit to barracuda156/macports-ports-powerpc that referenced this issue Feb 19, 2024
barracuda156 added a commit to barracuda156/macports-ports-powerpc that referenced this issue Feb 19, 2024
herbygillot pushed a commit to macports/macports-ports that referenced this issue Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants