Skip to content

Instantly share code, notes, and snippets.

@fumieval
Created March 13, 2015 03:11
Show Gist options
  • Save fumieval/e652db6485c0d94d5976 to your computer and use it in GitHub Desktop.
Save fumieval/e652db6485c0d94d5976 to your computer and use it in GitHub Desktop.
$ pacman -S liblzma
$ pacman -S liblzma-devel
$ git clone https://github.com/maoe/lzma
$ cd lzma
$ cabal configure --extra-include-dirs=C:\msys64\usr\include --extra-lib-dirs=C:\msys64\usr\lib
$ cabal build
Building lzma-0.0.0...
Preprocessing library lzma-0.0.0...
In file included from C:\msys64\usr\include/inttypes.h:14:0,
from C:\msys64\usr\include/lzma.h:116,
from Constants.hsc:27:
C:\msys64\usr\include/stdint.h:97:23: error: conflicting types for 'uintptr_t'
e:\ghc-7.8.4\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/include/_mingw.h:419:44: note:
previous declaration of 'uintptr_t' was here
In file included from C:\msys64\usr\include/lzma.h:116:0,
from Constants.hsc:27:
C:\msys64\usr\include/inttypes.h:263:10: warning: conflicting types for built-in function 'imaxabs' [enabled by default]
compiling dist\build\Codec\Compression\LZMA\Internal\Constants_hsc_make.c failed (exit code 1)
command was: E:\ghc-7.8.4\mingw\bin\gcc.exe -c dist\build\Codec\Compression\LZMA\Internal\Constants_hsc_make.c -o dist\b
uild\Codec\Compression\LZMA\Internal\Constants_hsc_make.o -D__GLASGOW_HASKELL__=708 -Dmingw32_BUILD_OS=1 -Dx86_64_BUILD_
ARCH=1 -Dmingw32_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -IC:\msys64\usr\include -Idist\build\autogen -include dist\build\autogen
\cabal_macros.h -IC:\Users\Fumiaki\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.4\vector-0.10.12.2\include -IC:\Users\Fu
miaki\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.4\primitive-0.5.4.0\include -IE:\ghc-7.8.4\lib\bytestring-0.10.4.0\in
clude -IE:\ghc-7.8.4\lib\base-4.7.0.2\include -IE:\ghc-7.8.4\lib\integer-gmp-0.5.1.0\include -IE:\ghc-7.8.4\lib/include
-IE:\ghc-7.8.4/lib/include/
$ cabal clean
$ cabal configure --extra-include-dirs=C:\msys64\usr\include --extra-lib-dirs=C:\msys64\usr\lib --with-gcc=E:\msys64\usr\bin\gcc.exe
$ cabal build
[1 of 8] Compiling Codec.Compression.LZMA.Internal.Constants ( dist\build\Codec\
Compression\LZMA\Internal\Constants.hs, dist\build\Codec\Compression\LZMA\Intern
al\Constants.o )
[2 of 8] Compiling Codec.Compression.LZMA.Internal.C ( dist\build\Codec\Compress
ion\LZMA\Internal\C.hs, dist\build\Codec\Compression\LZMA\Internal\C.o )
In file included from E:\ghc-7.8.4\lib/include/HsFFI.h:30:0,
from E:\ghc-7.8.4\lib/include/Rts.h:32,
from C:\Users\Fumiaki\AppData\Local\Temp\ghc11864_0\ghc11864_10
.c:2:
C:\msys64\usr\include/stdint.h:97:23: error: conflicting types for 'uintptr_t'
e:\ghc-7.8.4\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w6
4-mingw32/include/_mingw.h:419:44: note: previous declaration of 'uintptr_t' was
here
In file included from E:\ghc-7.8.4\lib/include/rts/Threads.h:19:0,
from E:\ghc-7.8.4\lib/include/Rts.h:206,
from C:\Users\Fumiaki\AppData\Local\Temp\ghc11864_0\ghc11864_10
.c:2:
C:\msys64\usr\include/sys/types.h:122:18: error: conflicting types for 'time_t'
e:\ghc-7.8.4\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w6
4-mingw32/include/_mingw.h:488:20: note: previous declaration of 'time_t' was he
re
<no location info>:
ghc.exe: phase `C Compiler' failed (exitcode = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment