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

PKG_CHECK_MODULES error when running ./configure #63

Open
akaihola opened this issue Nov 11, 2018 · 5 comments
Open

PKG_CHECK_MODULES error when running ./configure #63

akaihola opened this issue Nov 11, 2018 · 5 comments

Comments

@akaihola
Copy link

Since I'm on Fedora and omorfi documentation mostly talks about Ubuntu, I decided to try and create an Ubuntu based Docker image for omorfi.

Here is my first experimental Dockerfile:

FROM ubuntu

COPY . /omorfi
WORKDIR /omorfi
RUN apt-get update

RUN apt-get install -y autoconf automake libtool wget
RUN wget https://apertium.projectjj.com/apt/install-release.sh -O - | bash
RUN ./autogen.sh

RUN apt-get install -y hfst libhfst-dev python3 python3-libhfst zip
ENV AUTORECONF=false

RUN ./configure

I disabled autoreconf since it would always just fail.

In the ./configure script I now get this error:

./configure: line 20368: syntax error near unexpected token `LIBHFST,'
./configure: line 20368: `PKG_CHECK_MODULES(LIBHFST, hfst >= 3.15,'

I tried with

  • both nigthly and release Apertium,
  • Ubuntu Xenial and Bionic,
  • with and without all Apertium dependencies listed on the Prerequisites for Debian page, as well as
  • defining PKG_CONFIG_PATH and --with-hfst= manually,

but none of those fixed the issue.

@akaihola
Copy link
Author

akaihola commented Nov 11, 2018

I got forward by adding

RUN apt-get install -y pkgconf
RUN autoreconf -i -f

Maybe install instructions could make it clear that this is required for building?

@akaihola
Copy link
Author

I also had to add

RUN apt-get install -y g++

@flammie
Copy link
Owner

flammie commented Nov 12, 2018

Docker is a good idea, I think ubuntu has some package like build-essential which has most basic deps for building most autoconf-based projects. I'll add fix the dependencies in the doc, there's few other updates before release that is also hopefully soon.

@akaihola
Copy link
Author

akaihola commented Nov 12, 2018

Yes, build-essential can be used instead of listing individual packages related to building software, and it indeed includes g++ as well. I just prefer to avoid downloading and installing packages which are unneeded.

Here is the Dockerfile I ended up with and which does give me a usable omorfi environment:

FROM ubuntu

ENV AUTORECONF=false
ENV LANG=C.UTF-8

COPY . /omorfi
WORKDIR /omorfi
RUN apt-get update

RUN apt-get install -y wget
RUN wget https://apertium.projectjj.com/apt/install-release.sh -O - | bash

RUN apt-get install -y \
    autoconf \
    automake \
    libtool \
    g++ \
    hfst \
    libhfst-dev \
    make \
    pkgconf \
    python3 \
    python3-libhfst \
    zip

RUN ./autogen.sh
RUN autoreconf -i -f

RUN src/bash/omorfi-download.bash

RUN ./configure --enable-segmenter --enable-labeled-segments --enable-lemmatiser
RUN make
RUN make install
ENV PYTHONPATH=/omorfi/src/python

I wonder if it would make sense to turn src/python/ into a proper Python package and install it, instead of tweaking PYTHONPATH.

akaihola pushed a commit to akaihola/omorfi that referenced this issue Nov 12, 2018
@flammie
Copy link
Owner

flammie commented Nov 13, 2018

Automake has limited python support and installs the omorfi package to $prefix/lib/pythonX.Y/site-packages/omorfi at least on my gentoo installation; if prefix is same as python's e.g. /usr it should just work.... when there's lots of API changes like recently thought the installation might be incomplete.

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

2 participants