serverlesspub / imagemagick-aws-lambda-2

ImageMagick for AWS Lambda 2 runtimes
https://serverless.pub
Other
259 stars 162 forks source link

make all => gperf: command not found #10

Open svipsa opened 4 years ago

svipsa commented 4 years ago

Hi, I'm using Makefile_ImageMagick.txt from this issue: https://github.com/serverlesspub/imagemagick-aws-lambda-2/issues/6

But after a long time build I'm getting error:

Making install in src
make[2]: Entering directory `/var/task/build/fontconfig-2.13.0/src'
  GEN      fcobjshash.h
/var/task/build/fontconfig-2.13.0/missing: line 81: gperf: command not found
WARNING: 'gperf' is missing on your system.
         You might have modified some files without having the proper
         tools for further handling them.  Check the 'README' file, it
         often tells you about the needed prerequisites for installing
         this package.  You may also peek at any GNU archive site, in
         case some other package contains this missing 'gperf' program.
make[2]: *** [fcobjshash.h] Error 1
make[2]: Leaving directory `/var/task/build/fontconfig-2.13.0/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/var/task/build/fontconfig-2.13.0'
make: *** [/var/task/build/cache/lib/libfontconfig.a] Error 2
make: *** [all] Error 2

I tried:

make bash
yum install -y gcc gcc-c++ cmake3 intltool flex bison shared-mime-info gperf

and then make all

but still get issue with gperf: command not found

yum install gperf output:

bash-4.2# yum install gperf
Loaded plugins: ovl, priorities
amzn2-core                                                                                                                                                    | 2.4 kB  00:00:00
amzn2extra-docker                                                                                                                                             | 1.3 kB  00:00:00
(1/4): amzn2-core/2/x86_64/group_gz                                                                                                                           | 2.6 kB  00:00:00
(2/4): amzn2-core/2/x86_64/updateinfo                                                                                                                         | 174 kB  00:00:01
(3/4): amzn2extra-docker/2/x86_64/primary_db                                                                                                                  |  59 kB  00:00:00
(4/4): amzn2-core/2/x86_64/primary_db                                                                                                                         |  36 MB  00:00:29
Resolving Dependencies
--> Running transaction check
---> Package gperf.x86_64 0:3.0.4-8.amzn2.0.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================================================
 Package                                Arch                                    Version                                            Repository                                   Size
=====================================================================================================================================================================================
Installing:
 gperf                                  x86_64                                  3.0.4-8.amzn2.0.2                                  amzn2-core                                  303 k

Transaction Summary
=====================================================================================================================================================================================
Install  1 Package

Total download size: 303 k
Installed size: 601 k
Is this ok [y/d/N]: y
Downloading packages:
gperf-3.0.4-8.amzn2.0.2.x86_64.rpm                                                                                                                            | 303 kB  00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gperf-3.0.4-8.amzn2.0.2.x86_64                                                                                                                                    1/1
  Verifying  : gperf-3.0.4-8.amzn2.0.2.x86_64                                                                                                                                    1/1

Installed:
  gperf.x86_64 0:3.0.4-8.amzn2.0.2

Complete!
gojko commented 4 years ago

are you running this in the docker container through the main Makefile or somehow else?

svipsa commented 4 years ago

I run make bash - I enter the container yum install gperf - in the container.

So I just added yum install -y gperf to

$(LIBFREETYPE): $(FREETYPE_SOURCE) $(GLIB) $(LIBPNG) $(LIBBZ2) $(LIBHARFBUZZ)
    tar xf $<
    cd freetype-$(FREETYPE_VERSION)
    $(CONFIGURE) \
        --with-harfbuzz \
        --with-png \
        --with-bzip2
    yum install -y gperf
        make distclean clean
    make
    make install

And build has been built successfully.

I don't know why, but init: section was not worked.