Coder Social home page Coder Social logo

Comments (6)

bgamari avatar bgamari commented on May 16, 2024

Moritz Angermann [email protected] writes:

Given the rts (#22, #67) work around and the unix package #70 fix #69, we end up with the following:

Looking back at a log of a recent make build it looks like the usual command line is,

/usr/bin/gcc -E    -marm -fno-stack-protector -Wall -Werror  -Ilibraries/integer-gmp/dist-install/build/autogen -Ilibraries/integer-gmp/include  -std=c99 -Wall   -I'/mnt/work/arm/ghc/ghc-nightly/rts/dist/build' -I'/mnt/work/arm/ghc/ghc-nightly/includes' -I'/mnt/work/arm/ghc/ghc-nightly/includes/dist-derivedconstants
/header'   -Werror=unused-but-set-variable -Wno-error=inline       -MM -x c libraries/integer-gmp/cbits/wrappers.c -MF libraries/integer-gmp/dist-install/build/.depend-v-dyn.c_asm.bit

in contrast with Shake's command,

/usr/bin/clang -E -MM -std=c99 -Wall -Ilibraries/integer-gmp/stage1/build -Ilibraries/integer-gmp/stage1/build/autogen -Ilibraries/integer-gmp/include -I/Users/angerman/Projects/Haskell/ghc/rts/dist/build -I/Users/angerman/Projects/Haskell/ghc/includes -I/Users/angerman/Projects/Haskell/ghc/includes/dist-derivedconstants/header -MF libraries/integer-gmp/stage1/build/cbits/wrappers.c.deps -MT libraries/integer-gmp/stage1/build/cbits/wrappers.o -x c libraries/integer-gmp/cbits/wrappers.c

These match up pretty similarly. Moreover, gmp.h should typically be
in the system's default include path. In my Debian installation it's in
/usr/include/x86_64-linux-gnu/gmp.h. Do you perhaps not have gmp's
headers installed?

from hadrian.

angerman avatar angerman commented on May 16, 2024

Thanks for the hint @bgamari, looking for gmp.h in /usr, yields:

/usr/local/Cellar/ghc/7.10.2/libexec/integer-gmp/include/gmp.h
/usr/local/Cellar/gmp/6.1.0/include/gmp.h
/usr/local/include/gmp.h

Where /usr/local/include/gmp.h -> ../Cellar/gmp/6.1.0/include/gmp.h. So the question boils down to why /usr/local/include, is not on the include path. I do not really remember issues with the gmp.h with he make system, I think.

from hadrian.

angerman avatar angerman commented on May 16, 2024

With PR #78, I'm not stuck here again. I'll try to figure out why the include path's are missing.

from hadrian.

angerman avatar angerman commented on May 16, 2024

There seem to be happening actually quite a lot with make:

 Successfully remade target file `libraries/base/dist-install/build/.depend-v-dyn.haskell'.
  File `libraries/integer-gmp/dist-install/build/.depend-v-dyn.c_asm' does not exist.
    File `libraries/integer-gmp/gmp/gmp.h' does not exist.
   Must remake target `libraries/integer-gmp/gmp/gmp.h'.
rm -rf libraries/integer-gmp/gmp/gmp-5.0.3 libraries/integer-gmp/gmp/gmpbuild libraries/integer-gmp/gmp/objs
cat libraries/integer-gmp/gmp/tarball/gmp-5.0.3-nodoc-patched.tar.bz2 | bzip2 -d | { cd libraries/integer-gmp/gmp && /usr/bin/tar -xf - ; }
mv libraries/integer-gmp/gmp/gmp-5.0.3 libraries/integer-gmp/gmp/gmpbuild
cd libraries/integer-gmp/gmp && /usr/bin/patch -p0 < gmpsrc.patch
patching file gmpbuild/configure
patching file gmpbuild/memory.c
cat libraries/integer-gmp/gmp/tarball/gmp-5.0.4.patch | { cd libraries/integer-gmp/gmp/gmpbuild && /usr/bin/patch -p1 ; }
patching file ChangeLog
patching file configure
Hunk #8 succeeded at 29902 (offset 3 lines).
Hunk #9 succeeded at 29974 (offset 3 lines).
patching file gmp-h.in
patching file gmp-impl.h
patching file longlong.h
patching file Makefile.am
patching file Makefile.in
Hunk #2 succeeded at 427 with fuzz 2.
patching file mpf/cmp_si.c
patching file mpf/get_si.c
patching file mpf/iset_si.c
patching file mpf/set_si.c
patching file mpn/generic/gcdext.c
patching file mpn/generic/gcdext_subdiv_step.c
patching file mpn/generic/hgcd.c
patching file mpn/generic/powm_sec.c
patching file mpn/generic/toom63_mul.c
patching file mpn/generic/toom_interpolate_16pts.c
patching file mpn/generic/toom_interpolate_8pts.c
patching file mpn/generic/udiv_w_sdiv.c
patching file mpn/pa32/gmp-mparam.h
patching file mpn/powerpc32/divrem_2.asm
patching file mpn/x86_64/bd1/gmp-mparam.h
patching file mpq/set_si.c
patching file mpz/cmp_si.c
patching file mpz/get_si.c
patching file mpz/iset_si.c
patching file mpz/mul_i.h
patching file mpz/set_si.c
patching file NEWS
patching file tests/mpn/Makefile.am
patching file tests/mpn/Makefile.in
patching file tests/mpn/t-hgcd.c
patching file tests/mpn/t-mod_1.c
patching file tests/mpn/t-mul.c
patching file tests/mpn/t-toom6h.c
patching file tests/mpn/t-toom8h.c
patching file tests/mpz/t-gcd.c
patching file tests/mpz/t-powm.c
patching file tests/refmpn.c
patching file tune/README
chmod +x libraries/integer-gmp/gmp/ln
cd libraries/integer-gmp/gmp; (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
            PATH=`pwd`:$PATH; \
            export PATH; \
            cd gmpbuild && \
            CC=clang NM=/usr/bin/nm AR=/usr/bin/ar ./configure \
                  --enable-shared=no \
                  --host=x86_64-apple-darwin --build=x86_64-apple-darwin
/bin/sh: SHELLOPTS: readonly variable
checking build system type... /bin/sh: SHELLOPTS: readonly variable
/bin/sh: SHELLOPTS: readonly variable
x86_64-apple-darwin
checking host system type... /bin/sh: SHELLOPTS: readonly variable
/bin/sh: SHELLOPTS: readonly variable
x86_64-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/bin/sh: SHELLOPTS: readonly variable
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no

[...]

Successfully remade target file `all'.
cp libraries/integer-gmp/gmp/gmpbuild/gmp.h libraries/integer-gmp/gmp/
cp libraries/integer-gmp/gmp/gmpbuild/.libs/libgmp.a libraries/integer-gmp/gmp/
inplace/bin/mkdirhier libraries/integer-gmp/gmp/objs
cd libraries/integer-gmp/gmp/objs && /usr/bin/ar x ../libgmp.a
/usr/bin/ranlib libraries/integer-gmp/gmp/libgmp.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(mp_clz_tab.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obvprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obprntffuns.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(repl-vsnprintf.o) has no symbols
   Successfully remade target file `libraries/integer-gmp/gmp/gmp.h'.
    File `libraries/integer-gmp/include/ghc-gmp.h' does not exist.
   Must remake target `libraries/integer-gmp/include/ghc-gmp.h'.
cp libraries/integer-gmp/gmp/gmp.h libraries/integer-gmp/include/ghc-gmp.h
   Successfully remade target file `libraries/integer-gmp/include/ghc-gmp.h'.

from hadrian.

angerman avatar angerman commented on May 16, 2024

Looking at gmp/ghc.mk and IntegerGmp.hs, makes me believe, I'm missing parts of the build system?

from hadrian.

angerman avatar angerman commented on May 16, 2024

Ok. I think I figured out what needs to be done. I'm trying to create a Rules/IntegerGmp.hs similar to the Rules/Libffi.hs.

from hadrian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.