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

"stack build" failure #1

Closed
luckypoem opened this issue Aug 26, 2016 · 14 comments
Closed

"stack build" failure #1

luckypoem opened this issue Aug 26, 2016 · 14 comments

Comments

@luckypoem
Copy link

hi.

i installed shake: stack install shake

git clone https://github.com/dikmax/dikmax.name-ng
cd dikmax.name-ng
stack build

it shows:
...
While building package imagemagick-0.0.4.2 using:
/root/.stack/setup-exe-cache/i386-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/i386-linux/Cabal-1.22.5.0 configure --with-ghc=/root/.stack/programs/i386-linux/ghc-7.10.3/bin/ghc --with-ghc-pkg=/root/.stack/programs/i386-linux/ghc-7.10.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/root/.stack/snapshots/i386-linux/lts-6.9/7.10.3/pkgdb --package-db=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/pkgdb --libdir=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/lib --bindir=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/bin --datadir=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/share --libexecdir=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/libexec --sysconfdir=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/etc --docdir=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/doc/imagemagick-0.0.4.2 --htmldir=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/doc/imagemagick-0.0.4.2 --haddockdir=/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-6.9/7.10.3/doc/imagemagick-0.0.4.2 --dependency=base=base-4.8.2.0-a3ce8575fb7e5b352e3a0df9b7b44e44 --dependency=bytestring=bytestring-0.10.6.0-89a6fa47eb216379d389091d263e752c --dependency=filepath=filepath-1.4.0.0-59267d26bde9029c896503f5d82794cc --dependency=resourcet=resourcet-1.1.7.4-9d760d4d22013670e0774aba2c0e2819 --dependency=text=text-1.2.2.1-2411b35d3d37b404459a8d922c67ee1e --dependency=transformers=transformers-0.4.2.0-a5bbd954d1c2451a9da96a3615054cc0 --dependency=vector=vector-0.11.0.0-b91d6818d81e003e67d46e63b185a4a6
Process exited with code: ExitFailure 1
Logs have been written to: /usr/local/dikmax.name-ng/.stack-work/logs/imagemagick-0.0.4.2.log

Configuring imagemagick-0.0.4.2...
setup-Simple-Cabal-1.22.5.0-ghc-7.10.3: The pkg-config package 'ImageMagick'
is required but it could not be found.

root@AR:/usr/local/dikmax.name-ng#

how to fix it?
thanks

@dikmax
Copy link
Owner

dikmax commented Aug 26, 2016

As it says, you need pkg-config installed.
If on ubuntu try to run apt-get install pkg-config.

@luckypoem
Copy link
Author

hi.

root@AR:/usr/local/dikmax.name-ng# apt-get install -y pkg-config

it shows:
pkg-config is already the newest version.

root@AR:/usr/local/dikmax.name-ng#

so the issue is still not fixed.
thank u

@dikmax
Copy link
Owner

dikmax commented Aug 26, 2016

Do you have imagemagick installed?

Probably,

apt-get install libmagick++-dev

but I'm not sure. I've only previously setted up build process on Macs.

@dikmax
Copy link
Owner

dikmax commented Aug 31, 2016

As there's no more complaints, I'm closing this issue.

@dikmax dikmax closed this as completed Aug 31, 2016
@luckypoem
Copy link
Author

hi.
actually i didn't succeed.
firstly i ran:
apt-get install -y pkg-config libmagick++-dev imagemagick
i met no errors.but this time i ran "stack build",it shows:

...
dikmax-name-0.1.0.0: configure
Configuring dikmax-name-0.1.0.0...
dikmax-name-0.1.0.0: build
Preprocessing executable 'dikmax.name' for dikmax-name-0.1.0.0...
[ 1 of 39] Compiling FileServe ( src/FileServe.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/FileServe.o )
[ 2 of 39] Compiling Lucid.Atom ( src/Lucid/Atom.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Lucid/Atom.o )
[ 3 of 39] Compiling Template.Subscribe ( src/Template/Subscribe.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Template/Subscribe.o )
[ 4 of 39] Compiling Text.Pandoc.Utils ( src/Text/Pandoc/Utils.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Text/Pandoc/Utils.o )
[ 5 of 39] Compiling Template.SvgFlags.Spain ( src/Template/SvgFlags/Spain.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Template/SvgFlags/Spain.o )
[ 6 of 39] Compiling Template.SvgFlags.Moldova ( src/Template/SvgFlags/Moldova.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Template/SvgFlags/Moldova.o )
[ 7 of 39] Compiling Template.SvgFlags.Croatia ( src/Template/SvgFlags/Croatia.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Template/SvgFlags/Croatia.o )
[ 8 of 39] Compiling Template.SvgFlags ( src/Template/SvgFlags.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Template/SvgFlags.o )
[ 9 of 39] Compiling Text.Pandoc.Lens ( src/Text/Pandoc/Lens.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Text/Pandoc/Lens.o )
[10 of 39] Compiling Template.SvgIcons ( src/Template/SvgIcons.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Template/SvgIcons.o )
[11 of 39] Compiling Lucid.AMP ( src/Lucid/AMP.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Lucid/AMP.o )
[12 of 39] Compiling Template.Navigation ( src/Template/Navigation.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Template/Navigation.o )
[13 of 39] Compiling Lucid.Sitemap ( src/Lucid/Sitemap.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Lucid/Sitemap.o )
[14 of 39] Compiling Text.Pandoc.Binary ( src/Text/Pandoc/Binary.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Text/Pandoc/Binary.o )
[15 of 39] Compiling Map ( src/Map.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Map.o )
: can't load .so/.DLL for: /usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-7.2/8.0.1/lib/i386-linux-ghc-8.0.1/imagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X/libHSimagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X-ghc8.0.1.so (/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-7.2/8.0.1/lib/i386-linux-ghc-8.0.1/imagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X/libHSimagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X-ghc8.0.1.so: undefined symbol: MagickOptimizeImageTransparency)
Completed 125 action(s).

-- While building package dikmax-name-0.1.0.0 using:
/root/.stack/setup-exe-cache/i386-linux/setup-Simple-Cabal-1.24.0.0-ghc-8.0.1 --builddir=.stack-work/dist/i386-linux/Cabal-1.24.0.0 build exe:dikmax.name --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
root@AR:/usr/local/dikmax.name-ng#

how to fix it?

@dikmax
Copy link
Owner

dikmax commented Oct 25, 2016

I really can't say, because I don't have Ubuntu. Looks like incompatible
Imagick version, but it's just guess.

luckypoem [email protected] schrieb am Sa., 22. Okt. 2016 um
05:19 Uhr:

hi.
actually i didn't succeed.
firstly i ran:
apt-get install -y pkg-config libmagick++-dev imagemagick
i met no errors.but this time i ran "stack build",it shows:

...
dikmax-name-0.1.0.0: configure
Configuring dikmax-name-0.1.0.0...
dikmax-name-0.1.0.0: build
Preprocessing executable 'dikmax.name' for dikmax-name-0.1.0.0...
[ 1 of 39] Compiling FileServe ( src/FileServe.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/FileServe.o )
[ 2 of 39] Compiling Lucid.Atom ( src/Lucid/Atom.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Lucid/Atom.o )
[ 3 of 39] Compiling Template.Subscribe ( src/Template/Subscribe.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Template/Subscribe.o )
[ 4 of 39] Compiling Text.Pandoc.Utils ( src/Text/Pandoc/Utils.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Text/Pandoc/Utils.o )
[ 5 of 39] Compiling Template.SvgFlags.Spain (
src/Template/SvgFlags/Spain.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Template/SvgFlags/Spain.o )
[ 6 of 39] Compiling Template.SvgFlags.Moldova (
src/Template/SvgFlags/Moldova.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Template/SvgFlags/Moldova.o )
[ 7 of 39] Compiling Template.SvgFlags.Croatia (
src/Template/SvgFlags/Croatia.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Template/SvgFlags/Croatia.o )
[ 8 of 39] Compiling Template.SvgFlags ( src/Template/SvgFlags.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Template/SvgFlags.o )
[ 9 of 39] Compiling Text.Pandoc.Lens ( src/Text/Pandoc/Lens.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Text/Pandoc/Lens.o )
[10 of 39] Compiling Template.SvgIcons ( src/Template/SvgIcons.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Template/SvgIcons.o )
[11 of 39] Compiling Lucid.AMP ( src/Lucid/AMP.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Lucid/AMP.o )
[12 of 39] Compiling Template.Navigation ( src/Template/Navigation.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Template/Navigation.o )
[13 of 39] Compiling Lucid.Sitemap ( src/Lucid/Sitemap.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Lucid/Sitemap.o )
[14 of 39] Compiling Text.Pandoc.Binary ( src/Text/Pandoc/Binary.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Text/Pandoc/Binary.o )
[15 of 39] Compiling Map ( src/Map.hs,
.stack-work/dist/i386-linux/Cabal-1.24.0.0/build/
dikmax.name/dikmax.name-tmp/Map.o )
: can't load .so/.DLL for:
/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-7.2/8.0.1/lib/i386-linux-ghc-8.0.1/imagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X/
libHSimagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X-ghc8.0.1.so
(/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-7.2/8.0.1/lib/i386-linux-ghc-8.0.1/imagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X/
libHSimagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X-ghc8.0.1.so: undefined
symbol: MagickOptimizeImageTransparency)
Completed 125 action(s).

-- While building package dikmax-name-0.1.0.0 using:
/root/.stack/setup-exe-cache/i386-linux/setup-Simple-Cabal-1.24.0.0-ghc-8.0.1
--builddir=.stack-work/dist/i386-linux/Cabal-1.24.0.0 build exe:
dikmax.name --ghc-options " -ddump-hi -ddump-to-file"

Process exited with code: ExitFailure 1

root@AR:/usr/local/dikmax.name-ng#

how to fix it?


You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABChEmeOIxlE1P2tJmOEcLlBEsFWvAd0ks5q2YC-gaJpZM4Jt3aW
.

Best Regards,
Maxim Dikun

@luckypoem
Copy link
Author

hi.

i uninstalled imagemagick: apt-get remove imagemagick -y
then i compile imagemagick:
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar zxvf ImageMagick.tar.gz
cd ImageMagick-7.0.3-4
./configure
make
make install
( i met no errors)

cd /usr/local/dikmax.name-ng
root@AR:/usr/local/dikmax.name-ng# stack build
it exports:

No packages found in snapshot which provide a "hsc2hs" executable, which is a build-tool dependency of "imagemagick"
Missing build-tools may be caused by dependencies of the build-tool being overridden by extra-deps.
This should be fixed soon - see this issue commercialhaskell/stack#595

dikmax-name-0.1.0.0: build
Preprocessing executable 'dikmax.name' for dikmax-name-0.1.0.0...
[15 of 39] Compiling Map ( src/Map.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/dikmax.name/dikmax.name-tmp/Map.o )
: can't load .so/.DLL for: /usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-7.2/8.0.1/lib/i386-linux-ghc-8.0.1/imagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X/libHSimagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X-ghc8.0.1.so (/usr/local/dikmax.name-ng/.stack-work/install/i386-linux/lts-7.2/8.0.1/lib/i386-linux-ghc-8.0.1/imagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X/libHSimagemagick-0.0.4.2-HFTfkHlfa6X7IIrNVy2P3X-ghc8.0.1.so: undefined symbol: MagickOptimizeImageTransparency)

-- While building package dikmax-name-0.1.0.0 using:
/root/.stack/setup-exe-cache/i386-linux/setup-Simple-Cabal-1.24.0.0-ghc-8.0.1 --builddir=.stack-work/dist/i386-linux/Cabal-1.24.0.0 build exe:dikmax.name --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
root@AR:/usr/local/dikmax.name-ng#

so,even if imagemagick is compiled,i still encounter the same error.
why?how to fix it?

can u try to compile ur app in a linux vps?

is that ur app has to be compiled on a mac for success?

@luckypoem
Copy link
Author

i see here: commercialhaskell/stack#595 ,but in my vps, i do have executable file: hsc2hs
root@AR:/usr/local/dikmax.name-ng# which hsc2hs
/usr/local/haskell/ghc-8.0.1-i386/bin/hsc2hs
root@AR:/usr/local/dikmax.name-ng#

@luckypoem
Copy link
Author

luckypoem commented Nov 5, 2016

hi.

in my mac,i installed dikmax-name successfully:
"Linking
.stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/dikmax.name/dikmax.name "

but

yudeMacBook-Air:dikmax.name-ng brite$ .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/dikmax.name/dikmax.name build

it exports:
...
Error when running Shake build system:

  • build
  • prerequisites
    PREREQUISITE: 'zopflipng' is not available
    CallStack (from HasCallStack):
    error, called at src/Rules.hs:39:42 in main:Rules

yudeMacBook-Air:dikmax.name-ng brite$ stack install zopflipng

The following target packages were not found: zopflipng

yudeMacBook-Air:dikmax.name-ng yuming$

so how to fix the zopflipng issue?

@dikmax
Copy link
Owner

dikmax commented Nov 5, 2016

Hi.

I'm glad it's finally working. You can install zopfli through brew

brew install zopfli

But I'm afraid you won't be able to build it in the end. The build process requires images to be present, but they aren't in git because of size.

The only way I see now is to replace posts directory with your own.

@luckypoem
Copy link
Author

hi.

after compiling gdal/org2ogr (​http://download.osgeo.org/gdal/2.1.2/gdal-2.1.2.tar.gz , http://www.gdal.org/ogr2ogr.html)

yudeMacBook-Air:dikmax.name-ng brite$ .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/dikmax.name/dikmax.name build

it shows:
...
Error when running Shake build system:

  • build
  • sync-images
  • getDirectoryFiles "/Users/dikmax/Google Drive/dikmax.name-images/" [//*]
    /Users/dikmax/Google Drive/dikmax.name-images/: getDirectoryContents: does not exist (No such file or directory)

yudeMacBook-Air:dikmax.name-ng brite$ ls /Users/dikmax/Google Drive/dikmax.name-images/
ls: /Users/dikmax/Google: No such file or directory
ls: Drive/dikmax.name-images/: No such file or directory
yudeMacBook-Air:dikmax.name-ng brite$

how to fix it?

@dikmax
Copy link
Owner

dikmax commented Nov 5, 2016

In build.cfg you should specify the path to all site images.

@luckypoem
Copy link
Author

hi.

finally i set it up: http://dn.bright.biz.st/ ,but
how to change "Читать далее" to "read more"?
how to change "Старше" to "older posts"?
how to change "Моложе" to "newer posts"?

thank u

@dikmax
Copy link
Owner

dikmax commented Nov 6, 2016

For appearance need to dig into templates in src/Templates folder.
Check PostList.hs.

The "read more" string you'll find in config src/Config.hs.

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