textproc/hs-pandoc: Can't build because of broken JuicyPixels

Rainer Hurling rhurlin at gwdg.de
Sun May 12 13:07:03 UTC 2019


Am 12.05.19 um 08:58 schrieb Gleb Popov:
> 
> 
> On Sun, May 12, 2019 at 1:08 AM Rainer Hurling <rhurlin at gwdg.de <mailto:rhurlin at gwdg.de>> wrote:
> 
>     Am 10.05.19 um 14:54 schrieb Gleb Popov:
>     >
>     > On Fri, May 10, 2019 at 3:00 PM Rainer Hurling <rhurlin at gwdg.de <mailto:rhurlin at gwdg.de> <mailto:rhurlin at gwdg.de <mailto:rhurlin at gwdg.de>>> wrote:
>     >
>     >     Dear list,
>     >
>     >     After the updates of ghc and hs-ports hit the tree, I try to update
>     >     textproc/hs-pandoc. Unfortunately, cabal can not built JuicyPixels:
>     >
>     >
>     >     [..snip..]
>     >     Configuring library for JuicyPixels-3.3.3..
>     >     Preprocessing library for JuicyPixels-3.3.3..
>     >     Building library for JuicyPixels-3.3.3..
>     >     [ 1 of 30] Compiling Codec.Picture.InternalHelper (
>     >     src/Codec/Picture/InternalHelper.hs,
>     >     /usr/ports/textproc/hs-pandoc/work/pandoc-2.7.1/dist-newstyle/build/x86_64-freebsd/ghc-8.6.3/JuicyPixels-3.3.3/build/Codec/Picture/InternalHelper.o
>     >     )
>     >     [ 2 of 30] Compiling Codec.Picture.Metadata.Exif (
>     >     src/Codec/Picture/Metadata/Exif.hs,
>     >     /usr/ports/textproc/hs-pandoc/work/pandoc-2.7.1/dist-newstyle/build/x86_64-freebsd/ghc-8.6.3/JuicyPixels-3.3.3/build/Codec/Picture/Metadata/Exif.o
>     >     )
>     >     [ 3 of 30] Compiling Codec.Picture.Metadata (
>     >     src/Codec/Picture/Metadata.hs,
>     >     /usr/ports/textproc/hs-pandoc/work/pandoc-2.7.1/dist-newstyle/build/x86_64-freebsd/ghc-8.6.3/JuicyPixels-3.3.3/build/Codec/Picture/Metadata.o
>     >     )
>     >     [ 4 of 30] Compiling Codec.Picture.Tiff.Internal.Types (
>     >     src/Codec/Picture/Tiff/Internal/Types.hs,
>     >     /usr/ports/textproc/hs-pandoc/work/pandoc-2.7.1/dist-newstyle/build/x86_64-freebsd/ghc-8.6.3/JuicyPixels-3.3.3/build/Codec/Picture/Tiff/Internal/Types.o
>     >     )
>     >     [ 5 of 30] Compiling Codec.Picture.Tiff.Internal.Metadata (
>     >     src/Codec/Picture/Tiff/Internal/Metadata.hs,
>     >     /usr/ports/textproc/hs-pandoc/work/pandoc-2.7.1/dist-newstyle/build/x86_64-freebsd/ghc-8.6.3/JuicyPixels-3.3.3/build/Codec/Picture/Tiff/Internal/Metadata.o
>     >     )
>     >     [ 6 of 30] Compiling Codec.Picture.Types ( src/Codec/Picture/Types.hs,
>     >     /usr/ports/textproc/hs-pandoc/work/pandoc-2.7.1/dist-newstyle/build/x86_64-freebsd/ghc-8.6.3/JuicyPixels-3.3.3/build/Codec/Picture/Types.o
>     >     )
>     >     ghc: internal error: m32_allocator_init: Failed to map
>     >         (GHC version 8.6.3 for x86_64_portbld_freebsd)
>     >         Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>     >     cabal: Failed to build JuicyPixels-3.3.3 (which is required by
>     >     exe:pandoc from
>     >     pandoc-2.7.1). The build process terminated with exit code -6
>     >     *** Error code 1
>     >     Stop.
>     >     make[1]: stopped in /usr/ports/textproc/hs-pandoc
>     >     *** Error code 1
>     >
>     >
>     >     This is on 13-0 CURRENT amd64 r347130. I need Pandoc for my daily work
>     >     with math/R.
>     >
>     >     Any help is really appreciated. Thanks in advance.
>     >
>     >
>     > I wasn't able to reproduce this locally, although I have a bit earlier world revision. But the error message resembles an out of memory one. Have you tried building pandoc again?
> 
>     Thanks for the response and sorry for the late answer.
> 
>     Unfortunately, the error also occurs on Poudriere, on two boxes with older hardware (AMD Phenom II X6 1090T and Intel Core i7-2760QM). Building pandoc again, even with -DMAKE_JOBS_DISABLE=yes does not help.
> 
> 
> Does the error occurs in the same place? That is, when compiling  [ 6 of 30] Compiling Codec.Picture.Types module?

Yes, on Poudriere exactly the same error in the same place.


> Do you have any additional knobs set in make.conf?

No additional knobs on Poudriere, but on the box itself (/etc/make.conf):

MALLOC_PRODUCTION=yes
INSTALL_NODEBUG=yes


> 
> Another thing to try is to rebuild lang/ghc port or send me your ghc executable.

If I try to build lang/ghc (with default options) via portmaster, I get the following build error:

[..snip..]
echo '#!/bin/sh'                                                     >> inplace/bin/ghc-pkg
echo 'executablename="/usr/ports/lang/ghc/work/ghc-8.6.3/inplace/lib/bin/ghc-pkg"'                                  >> inplace/bin/ghc-pkg
echo 'datadir="/usr/ports/lang/ghc/work/ghc-8.6.3/inplace/lib"'                             >> inplace/bin/ghc-pkg
echo 'bindir="/usr/ports/lang/ghc/work/ghc-8.6.3/inplace/bin"'                              >> inplace/bin/ghc-pkg
echo 'topdir="/usr/ports/lang/ghc/work/ghc-8.6.3/inplace/lib"'                           >> inplace/bin/ghc-pkg
echo 'pgmgcc="cc"'                                               >> inplace/bin/ghc-pkg
echo 'export LD_LIBRARY_PATH="/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/terminfo/dist-boot/build:/usr/local/lib:/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/ghc-boot/dist-boot/build:/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/ghc-boot-th/dist-boot/build:/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/Cabal/Cabal/dist-boot/build:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/process-1.6.3.0:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/pretty-1.1.3.6:/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/parsec/dist-boot/build:/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/text/dist-boot/build:/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/mtl/dist-boot/build:/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/transformers/dist-boot/build:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/directory-1.3.1.5:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/unix-2.7.2.2:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/filepath-1.4.2:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/time-1.8.0.2:/usr/ports/lang/ghc/work/ghc-8.6.3/libraries/binary/dist-boot/build:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/containers-0.5.11.0:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/bytestring-0.10.8.2:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/deepseq-1.4.3.0:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/array-0.5.2.0:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/base-4.11.1.0:/usr/local/lib:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/integer-gmp-1.0.2.0:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/ghc-prim-0.5.2.0:/usr/ports/lang/ghc/work/ghc-8.4.3-boot/lib/ghc-8.4.3/rts${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"' >> inplace/bin/ghc-pkg
cat utils/ghc-pkg/ghc-pkg.wrapper                                     >> inplace/bin/ghc-pkg
chmod +x                                                     inplace/bin/ghc-pkg
  HC [stage 0] compiler/stage1/build/LlvmCodeGen/Regs.o
  HC [stage 0] compiler/stage1/build/SPARC/CodeGen/Gen32.o
cc -E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs -P -DTOP='"/usr/ports/lang/ghc/work/ghc-8.6.3"' -DFFI_INCLUDE_DIR=/usr/local/include -DFFI_LIB_DIR=/usr/local/lib '-DFFI_LIB=' -x c -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header rts/package.conf.in -o rts/dist/package.conf.inplace.raw
grep -v '^#pragma GCC' rts/dist/package.conf.inplace.raw | sed -e 's/""//g' -e 's/:[ 	]*,/: /g' > rts/dist/package.conf.inplace
"inplace/bin/ghc-pkg" update --force rts/dist/package.conf.inplace
Reading package info from "rts/dist/package.conf.inplace" ... done.
rts-1.0: Warning: .:744:1: The field "hugs-options" is deprecated. hugs isn't supported anymore
rts-1.0: Warning: library-dirs: /usr/ports/lang/ghc/work/ghc-8.6.3/rts/dist/build doesn't exist or isn't a directory
rts-1.0: Warning: include-dirs: /usr/ports/lang/ghc/work/ghc-8.6.3/rts/dist/build doesn't exist or isn't a directory
rts-1.0: cannot find any of ["libHSrts.a","libHSrts.p_a","libHSrts-ghc8.6.3.so","libHSrts-ghc8.6.3.dylib","HSrts-ghc8.6.3.dll"] on library path (ignoring)
  HC [stage 0] compiler/stage1/build/RegAlloc/Linear/Main.o
  HC [stage 0] compiler/stage1/build/StgCmmTicky.o
gmake[3]: *** [compiler/ghc.mk:446: compiler/stage1/build/HsInstances.o] Bus error (core dumped)
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [Makefile:125: all] Error 2
gmake[2]: Leaving directory '/usr/ports/lang/ghc/work/ghc-8.6.3'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/ghc
*** Error code 1


Doing the same build via "portmaster -m 'MAKE_JOBS_UNSAFE=yes' lang/ghc" the build ends successful.

> 
> 
>     This is with 16 GB RAM and 32 GB swap, SSD has 25 GB of free mem. So I would expect, that this is not an 'out of memory' problem.
> 
>     >
>     >     Regards,
>     >     Rainer Hurling
> 



More information about the freebsd-haskell mailing list