My OS is GNU/Ubuntu 16.10- 64bit.
i also report this to GoLang.
https://github.com/golang/go/issues/19444
$ go get llvm.org/llvm/bindings/go/llvm
package llvm.org/llvm/bindings/go/llvm: unrecognized import path "llvm.org/llvm/bindings/go/llvm" (parse https://llvm.org/llvm/bindings/go/llvm?go-get=1: no go-import meta tags ())
$ go get llvm.org/llvm/bindings
package llvm.org/llvm/bindings: unrecognized import path "llvm.org/llvm/bindings" (parse https://llvm.org/llvm/bindings?go-get=1: no go-import meta tags ())
so go get say not parse https://llvm.org/llvm/bindings?go-get=1
in browser also https://llvm.org/ not open.(HTTPS)
Not Found
The requested URL / was not found on this server.
Apache/2.2.22 (Ubuntu) Server at llvm.org Port 443
but http://llvm.org is good.(HTTP)
how can get this libs for GoLang?
==================
Try github.com/go-llvm/llgo :
guest#system:~/go/src/github.com/go-llvm/llgo$ ./llgo-go.sh build
can't load package: package github.com/go-llvm/llgo: no buildable Go source files in /home/guest/go/src/github.com/go-llvm/llgo
guest#system:~/go/src/github.com/go-llvm/llgo$ ./llgo-go.sh install
can't load package: package github.com/go-llvm/llgo: no buildable Go source files in /home/guest/go/src/github.com/go-llvm/llgo
guest#system:~/go/src/github.com/go-llvm/llgo$ ./llgo-go.sh install
can't load package: package github.com/go-llvm/llgo: no buildable Go source files in /home/guest/go/src/github.com/go-llvm/llgo
guest#system:~/go/src/github.com/go-llvm/llgo$ make
./update_clang.sh
can't load package: package llvm.org/llvm/bindings/go/llvm: cannot find package "llvm.org/llvm/bindings/go/llvm" in any of:
/usr/lib/go-1.8/src/llvm.org/llvm/bindings/go/llvm (from $GOROOT)
/home/guest/go/src/llvm.org/llvm/bindings/go/llvm (from $GOPATH)
Makefile:25: recipe for target 'workdir/.update-clang-stamp' failed
make: *** [workdir/.update-clang-stamp] Error 1
guest#system:~/go/src/github.com/go-llvm/llgo$ export PATH=/path/to/gcc-inst/bin:$PATH
guest#system:~/go/src/github.com/go-llvm/llgo$ export LD_LIBRARY_PATH=/path/to/gcc-inst/lib64:$LD_LIBRARY_PATH
guest#system:~/go/src/github.com/go-llvm/llgo$ export CC=`which gcc`
guest#system:~/go/src/github.com/go-llvm/llgo$ export CXX=`which g++`
guest#system:~/go/src/github.com/go-llvm/llgo$ export LIBGO_CFLAGS=--gcc-toolchain=/path/to/gcc-inst
guest#system:~/go/src/github.com/go-llvm/llgo$ go get -d github.com/go-llvm/llgo/cmd/gllgo
package llvm.org/llvm/bindings/go/llvm: unrecognized import path "llvm.org/llvm/bindings/go/llvm" (parse https://llvm.org/llvm/bindings/go/llvm?go-get=1: no go-import meta tags ())
package golang.org/x/tools/go/exact: cannot find package "golang.org/x/tools/go/exact" in any of:
/usr/lib/go-1.8/src/golang.org/x/tools/go/exact (from $GOROOT)
/home/guest/go/src/golang.org/x/tools/go/exact (from $GOPATH)
package golang.org/x/tools/go/gccgoimporter: cannot find package "golang.org/x/tools/go/gccgoimporter" in any of:
/usr/lib/go-1.8/src/golang.org/x/tools/go/gccgoimporter (from $GOROOT)
/home/guest/go/src/golang.org/x/tools/go/gccgoimporter (from $GOPATH)
package golang.org/x/tools/go/importer: cannot find package "golang.org/x/tools/go/importer" in any of:
/usr/lib/go-1.8/src/golang.org/x/tools/go/importer (from $GOROOT)
/home/guest/go/src/golang.org/x/tools/go/importer (from $GOPATH)
guest#system:~/go/src/github.com/go-llvm/llgo$ $GOPATH/src/llvm.org/llvm/bindings/go/build.sh -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host
bash: /home/guest/go/src/llvm.org/llvm/bindings/go/build.sh: No such file or directory
guest#system:~/go/src/github.com/go-llvm/llgo$
$ go version
go version go1.8 linux/amd64
$ cmake -version
cmake version 3.8.20170216-gb9229
CMake suite maintained and supported by Kitware (kitware.com/cmake).
guest#system:~/go/src/github.com/go-llvm/llvm$ ./update_llvm.sh
+ llvm_components=all-targets analysis asmparser asmprinter bitreader bitwriter codegen core debuginfo executionengine instrumentation interpreter ipo irreader linker mc mcjit objcarcopts option profiledata scalaropts support target
+ dirname ./update_llvm.sh
+ gollvmdir=.
+ grep run_update_llvm_sh_to_get_revision_ ./llvm_dep.go
+ sed -E -e s/.*run_update_llvm_sh_to_get_revision_([0-9]+.*)/\1/g
+ llvmrev=218171
+ workdir=./workdir
+ llvmdir=./workdir/llvm
+ llvm_builddir=./workdir/llvm_build
+ mkdir -p ./workdir
+ svn co -r 218171 https://llvm.org/svn/llvm-project/llvm/trunk ./workdir/llvm
Checked out revision 218171.
+ mkdir -p ./workdir/llvm_build
+ cmake_flags=../llvm
+ llvm_config=./workdir/llvm_build/bin/llvm-config
+ which ninja
+ test -n /usr/bin/ninja
+ cd ./workdir/llvm_build
+ cmake -G Ninja ../llvm
-- Target triple: x86_64-unknown-linux-gnu
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Sphinx disabled.
CMake Warning (dev) at cmake/modules/HandleLLVMOptions.cmake:131 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "C_SUPPORTS_FPIC" will no longer be dereferenced when
the policy is set to NEW. Since the policy is not set the OLD behavior
will be used.
Call Stack (most recent call first):
cmake/modules/HandleLLVMOptions.cmake:148 (add_flag_or_print_warning)
CMakeLists.txt:315 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Targeting AArch64
-- Targeting ARM
-- Targeting CppBackend
-- Targeting Hexagon
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting R600
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting X86
-- Targeting XCore
-- Configuring done
-- Generating done
-- Build files have been written to: /home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm_build
+ ninja -C ./workdir/llvm_build llvm-config
ninja: Entering directory `./workdir/llvm_build'
[2/2] Linking CXX executable bin/llvm-config
+ ./workdir/llvm_build/bin/llvm-config --libs all-targets analysis asmparser asmprinter bitreader bitwriter codegen core debuginfo executionengine instrumentation interpreter ipo irreader linker mc mcjit objcarcopts option profiledata scalaropts support target
+ sed -e s/-l//g
+ llvm_buildtargets=LLVMOption LLVMObjCARCOpts LLVMMCJIT LLVMRuntimeDyld LLVMLinker LLVMIRReader LLVMipo LLVMVectorize LLVMInterpreter LLVMInstrumentation LLVMExecutionEngine LLVMDebugInfo LLVMBitWriter LLVMAsmParser LLVMXCoreDisassembler LLVMXCoreCodeGen LLVMXCoreDesc LLVMXCoreInfo LLVMXCoreAsmPrinter LLVMX86Disassembler LLVMX86AsmParser LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter LLVMX86Utils LLVMSystemZDisassembler LLVMSystemZCodeGen LLVMSystemZAsmParser LLVMSystemZDesc LLVMSystemZInfo LLVMSystemZAsmPrinter LLVMSparcDisassembler LLVMSparcCodeGen LLVMSparcAsmParser LLVMSparcDesc LLVMSparcInfo LLVMSparcAsmPrinter LLVMR600CodeGen LLVMR600Desc LLVMR600Info LLVMR600AsmPrinter LLVMPowerPCDisassembler LLVMPowerPCCodeGen LLVMPowerPCAsmParser LLVMPowerPCDesc LLVMPowerPCInfo LLVMPowerPCAsmPrinter LLVMNVPTXCodeGen LLVMNVPTXDesc LLVMNVPTXInfo LLVMNVPTXAsmPrinter LLVMMSP430CodeGen LLVMMSP430Desc LLVMMSP430Info LLVMMSP430AsmPrinter LLVMMipsDisassembler LLVMMipsCodeGen LLVMMipsAsmParser LLVMMipsDesc LLVMMipsInfo LLVMMipsAsmPrinter LLVMHexagonCodeGen LLVMHexagonAsmPrinter LLVMHexagonDesc LLVMHexagonInfo LLVMCppBackendCodeGen LLVMCppBackendInfo LLVMARMDisassembler LLVMARMCodeGen LLVMARMAsmParser LLVMARMDesc LLVMARMInfo LLVMARMAsmPrinter LLVMAArch64Disassembler LLVMMCDisassembler LLVMAArch64CodeGen LLVMSelectionDAG LLVMAsmPrinter LLVMCodeGen LLVMScalarOpts LLVMProfileData LLVMObject LLVMBitReader LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMTarget LLVMCore LLVMAArch64AsmParser LLVMMCParser LLVMAArch64Desc LLVMAArch64Info LLVMAArch64AsmPrinter LLVMMC LLVMAArch64Utils LLVMSupport
+ ninja -C ./workdir/llvm_build LLVMOption LLVMObjCARCOpts LLVMMCJIT LLVMRuntimeDyld LLVMLinker LLVMIRReader LLVMipo LLVMVectorize LLVMInterpreter LLVMInstrumentation LLVMExecutionEngine LLVMDebugInfo LLVMBitWriter LLVMAsmParser LLVMXCoreDisassembler LLVMXCoreCodeGen LLVMXCoreDesc LLVMXCoreInfo LLVMXCoreAsmPrinter LLVMX86Disassembler LLVMX86AsmParser LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter LLVMX86Utils LLVMSystemZDisassembler LLVMSystemZCodeGen LLVMSystemZAsmParser LLVMSystemZDesc LLVMSystemZInfo LLVMSystemZAsmPrinter LLVMSparcDisassembler LLVMSparcCodeGen LLVMSparcAsmParser LLVMSparcDesc LLVMSparcInfo LLVMSparcAsmPrinter LLVMR600CodeGen LLVMR600Desc LLVMR600Info LLVMR600AsmPrinter LLVMPowerPCDisassembler LLVMPowerPCCodeGen LLVMPowerPCAsmParser LLVMPowerPCDesc LLVMPowerPCInfo LLVMPowerPCAsmPrinter LLVMNVPTXCodeGen LLVMNVPTXDesc LLVMNVPTXInfo LLVMNVPTXAsmPrinter LLVMMSP430CodeGen LLVMMSP430Desc LLVMMSP430Info LLVMMSP430AsmPrinter LLVMMipsDisassembler LLVMMipsCodeGen LLVMMipsAsmParser LLVMMipsDesc LLVMMipsInfo LLVMMipsAsmPrinter LLVMHexagonCodeGen LLVMHexagonAsmPrinter LLVMHexagonDesc LLVMHexagonInfo LLVMCppBackendCodeGen LLVMCppBackendInfo LLVMARMDisassembler LLVMARMCodeGen LLVMARMAsmParser LLVMARMDesc LLVMARMInfo LLVMARMAsmPrinter LLVMAArch64Disassembler LLVMMCDisassembler LLVMAArch64CodeGen LLVMSelectionDAG LLVMAsmPrinter LLVMCodeGen LLVMScalarOpts LLVMProfileData LLVMObject LLVMBitReader LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMTarget LLVMCore LLVMAArch64AsmParser LLVMMCParser LLVMAArch64Desc LLVMAArch64Info LLVMAArch64AsmPrinter LLVMMC LLVMAArch64Utils LLVMSupport FileCheck
ninja: Entering directory `./workdir/llvm_build'
ninja: no work to do.
+ ./workdir/llvm_build/bin/llvm-config --version
+ llvm_version=3.6.0svn
+ ./workdir/llvm_build/bin/llvm-config --cppflags
+ llvm_cflags=-I/home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm/include -I/home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm_build/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
+ uname
+ [ Linux == Darwin ]
./update_llvm.sh: 59: [: Linux: unexpected operator
+ ./workdir/llvm_build/bin/llvm-config --ldflags
+ ./workdir/llvm_build/bin/llvm-config --libdir
+ ./workdir/llvm_build/bin/llvm-config --libs all-targets analysis asmparser asmprinter bitreader bitwriter codegen core debuginfo executionengine instrumentation interpreter ipo irreader linker mc mcjit objcarcopts option profiledata scalaropts support target
+ ./workdir/llvm_build/bin/llvm-config --system-libs
+ llvm_ldflags=-L/home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm_build//lib -Wl,-rpath,/home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm_build//lib -lLLVMOption -lLLVMObjCARCOpts -lLLVMMCJIT -lLLVMRuntimeDyld -lLLVMLinker -lLLVMIRReader -lLLVMipo -lLLVMVectorize -lLLVMInterpreter -lLLVMInstrumentation -lLLVMExecutionEngine -lLLVMDebugInfo -lLLVMBitWriter -lLLVMAsmParser -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSystemZDisassembler -lLLVMSystemZCodeGen -lLLVMSystemZAsmParser -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSystemZAsmPrinter -lLLVMSparcDisassembler -lLLVMSparcCodeGen -lLLVMSparcAsmParser -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMSparcAsmPrinter -lLLVMR600CodeGen -lLLVMR600Desc -lLLVMR600Info -lLLVMR600AsmPrinter -lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMipsAsmParser -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMHexagonCodeGen -lLLVMHexagonAsmPrinter -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMAArch64Disassembler -lLLVMMCDisassembler -lLLVMAArch64CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMProfileData -lLLVMObject -lLLVMBitReader -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMAArch64AsmParser -lLLVMMCParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport -lrt -ldl -ltinfo -latomic -lpthread -lz
+ sed -e s##LLVM_REVISION##218171#g; s##LLVM_CFLAGS##-I/home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm/include -I/home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm_build/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS#g; s##LLVM_LDFLAGS##-L/home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm_build//lib -Wl,-rpath,/home/guest/go/src/github.com/go-llvm/llvm/workdir/llvm_build//lib -lLLVMOption -lLLVMObjCARCOpts -lLLVMMCJIT -lLLVMRuntimeDyld -lLLVMLinker -lLLVMIRReader -lLLVMipo -lLLVMVectorize -lLLVMInterpreter -lLLVMInstrumentation -lLLVMExecutionEngine -lLLVMDebugInfo -lLLVMBitWriter -lLLVMAsmParser -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSystemZDisassembler -lLLVMSystemZCodeGen -lLLVMSystemZAsmParser -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSystemZAsmPrinter -lLLVMSparcDisassembler -lLLVMSparcCodeGen -lLLVMSparcAsmParser -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMSparcAsmPrinter -lLLVMR600CodeGen -lLLVMR600Desc -lLLVMR600Info -lLLVMR600AsmPrinter -lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMipsAsmParser -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMHexagonCodeGen -lLLVMHexagonAsmPrinter -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMAArch64Disassembler -lLLVMMCDisassembler -lLLVMAArch64CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMProfileData -lLLVMObject -lLLVMBitReader -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMAArch64AsmParser -lLLVMMCParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport -lrt -ldl -ltinfo -latomic -lpthread -lz#g ./llvm_config.go.in
+ printf package llvm\n\nconst Version = "%s"\n 3.6.0svn
guest#system:~/go/src/github.com/go-llvm/llvm/examples$ cd factorial
guest#system:~/go/src/github.com/go-llvm/llvm/examples/factorial$ ls
factorial factorial.go
guest#system:~/go/src/github.com/go-llvm/llvm/examples/factorial$ go build factorial.go
guest#system:~/go/src/github.com/go-llvm/llvm/examples/factorial$ ./factorial
; ModuleID = 'fac_module'
define i32 #fac(i32) {
entry:
%cmptmp = icmp eq i32 %0, 0
br i1 %cmptmp, label %end, label %iffalse
iffalse: ; preds = %entry
%subtmp = add i32 %0, -1
%calltmp = call i32 #fac(i32 %subtmp)
%multmp = mul i32 %calltmp, %0
br label %end
end: ; preds = %entry, %iffalse
%result = phi i32 [ %multmp, %iffalse ], [ 1, %entry ]
ret i32 %result
}
-----------------------------------------
Running fac(10) with JIT...
Result: 3628800
DONE
guest#system:~$ go get llvm.org/llvm.v36/bindings/go/llvm
package llvm.org/llvm.v36/bindings/go/llvm: unrecognized import path "llvm.org/llvm.v36/bindings/go/llvm" (parse https://llvm.org/llvm.v36/bindings/go/llvm?go-get=1: no go-import meta tags ())
guest#system:~$ go get -d llvm.org/llvm.v36/bindings/go/llvm
package llvm.org/llvm.v36/bindings/go/llvm: unrecognized import path "llvm.org/llvm.v36/bindings/go/llvm" (parse https://llvm.org/llvm.v36/bindings/go/llvm?go-get=1: no go-import meta tags ())
$ which llvm-config
/usr/bin/llvm-config
guest#system:~/go/src/github.com/go-llvm/llvm/workdir/llvm_build/bin$ ls
FileCheck llvm-config llvm-lit llvm-tblgen
guest#system:~/go/src/github.com/axw/llgo$ ./update_third_party.sh
github.com/axw/llgo$ ./update_third_party.sh
Cloning into '/tmp/update_third_party.auPNC9/gofrontend'...
remote: Sending approximately 92.68 MiB ...
remote: Counting objects: 3087, done
remote: Finding sources: 100% (69/69)
remote: Total 33940 (delta 26755), reused 33933 (delta 26755)
Receiving objects: 100% (33940/33940), 92.79 MiB | 60.00 KiB/s, done.
Resolving deltas: 100% (26755/26755), done.
Checking connectivity... done.
Note: checking out '81eb6a3f425b2158c67ee32c0cc973a72ce9d6be'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 81eb6a3... runtime: don't overallocate in select code
patching file libgo/runtime/chan.goc
patching file libgo/runtime/chan.h
patching file libgo/runtime/heapdump.c
patching file libgo/runtime/malloc.goc
patching file libgo/runtime/malloc.h
Hunk #1 succeeded at 392 (offset 2 lines).
Hunk #2 succeeded at 403 (offset 2 lines).
Hunk #3 succeeded at 460 (offset 2 lines).
Hunk #4 succeeded at 478 (offset 2 lines).
Hunk #5 succeeded at 507 (offset 2 lines).
patching file libgo/runtime/mcache.c
patching file libgo/runtime/mcentral.c
patching file libgo/runtime/mgc0.c
Hunk #3 succeeded at 1380 (offset 2 lines).
Hunk #4 succeeded at 1390 (offset 2 lines).
Hunk #5 succeeded at 1804 (offset 2 lines).
Hunk #6 succeeded at 2151 (offset 4 lines).
Hunk #7 succeeded at 2428 (offset 5 lines).
Hunk #8 succeeded at 2443 (offset 5 lines).
Hunk #9 succeeded at 2451 (offset 5 lines).
patching file libgo/runtime/mheap.c
patching file libgo/runtime/netpoll.goc
patching file libgo/runtime/proc.c
Hunk #1 succeeded at 326 (offset 24 lines).
Hunk #2 succeeded at 809 (offset 100 lines).
Hunk #3 succeeded at 820 (offset 100 lines).
Hunk #4 succeeded at 847 (offset 100 lines).
Hunk #5 succeeded at 855 (offset 100 lines).
Hunk #6 succeeded at 864 (offset 100 lines).
Hunk #7 succeeded at 881 (offset 100 lines).
Hunk #8 succeeded at 894 (offset 100 lines).
Hunk #9 succeeded at 933 (offset 100 lines).
Hunk #10 succeeded at 953 (offset 100 lines).
Hunk #11 succeeded at 987 (offset 100 lines).
Hunk #12 succeeded at 1011 (offset 100 lines).
Hunk #13 succeeded at 1452 (offset 106 lines).
Hunk #14 succeeded at 1481 (offset 106 lines).
Hunk #15 succeeded at 1525 (offset 106 lines).
Hunk #16 succeeded at 1618 (offset 106 lines).
Hunk #17 succeeded at 1673 (offset 106 lines).
Hunk #18 succeeded at 1709 (offset 106 lines).
Hunk #19 succeeded at 1730 (offset 106 lines).
Hunk #20 succeeded at 1749 (offset 106 lines).
Hunk #21 succeeded at 1794 (offset 106 lines).
Hunk #22 succeeded at 1832 (offset 106 lines).
Hunk #23 succeeded at 1928 (offset 106 lines).
Hunk #24 succeeded at 2031 (offset 106 lines).
Hunk #25 succeeded at 2159 (offset 106 lines).
Hunk #26 succeeded at 2184 (offset 106 lines).
Hunk #27 succeeded at 2192 (offset 106 lines).
Hunk #28 succeeded at 2484 (offset 119 lines).
Hunk #29 succeeded at 2595 (offset 119 lines).
Hunk #30 succeeded at 2627 (offset 119 lines).
Hunk #31 succeeded at 2657 (offset 119 lines).
Hunk #32 succeeded at 2682 (offset 119 lines).
Hunk #33 succeeded at 2826 (offset 119 lines).
Hunk #34 succeeded at 2906 (offset 126 lines).
Hunk #35 succeeded at 3044 (offset 126 lines).
Hunk #36 succeeded at 3080 (offset 126 lines).
Hunk #37 succeeded at 3112 (offset 126 lines).
Hunk #38 succeeded at 3268 (offset 126 lines).
Hunk #39 succeeded at 3422 (offset 126 lines).
patching file libgo/runtime/runtime.h
patching file libgo/runtime/sema.goc
patching file libgo/runtime/sigqueue.goc
patching file libgo/runtime/time.goc
patching file libgo/Makefile.am
Hunk #1 succeeded at 4139 (offset 401 lines).
Hunk #2 succeeded at 4246 (offset 409 lines).
patching file libgo/Makefile.in
Hunk #1 succeeded at 2433 (offset 221 lines).
Hunk #2 succeeded at 2540 (offset 229 lines).
patching file libgo/go/runtime/mfinal_test.go
Hunk #1 succeeded at 65 (offset 3 lines).
cp: cannot stat '../../cmake/config.guess': No such file or directory
how can fix?
Related
I wrote a small linker in fortran-cpp to read a file with some numbers.
$cat mainProg.f
program fprogram
real*8 c(30)
do i=1,30
c(i) = i * 1.0
end do
print*,"Before calling cpp function"
c PASS ARRAY "C" TO CPP
call pass_to_cpp(c)
print*,"After calling cpp function"
do i=1,30
print*,' c =',c(i)
end do
print*,"I'm done here ..!!"
c stop
end
and,
$cat cprog.C
#include<iostream>
#include<cmath>
#include<fstream>
using namespace std;
extern "C" {
void pass_to_cpp_(double *c);
}
void pass_to_cpp_(double *c)
{
ifstream myfile ("example.txt");
for(int i=0; i<30; i++)
{
myfile >> c[i];
cout <<"called = " << i << "\n";
}
}
I am building this on ubuntu 16.04 to be run on a windows machine. I am usin mingw for compiling.
Here is the error on windows:
called = 0
Program received a signal SIGSEGV: Segmentation fault - invalid memory reference
Backtrace for this error:
#0 ffffffffffffff
#1 ffffffffffffff
#2 ffffffffffffff
#3 ffffffffffffff
#4 ffffffffffffff
#5 ffffffffffffff
#6 ffffffffffffff
#7 ffffffffffffff
#8 ffffffffffffff
#9 ffffffffffffff
#10 ffffffffffffff
#11 ffffffffffffff
#12 ffffffffffffff
#13 ffffffffffffff
#14 ffffffffffffff
#15 ffffffffffffff
File 'example.txt' is a simple file with 30 numbers.
Any suggestions on what is the cause of the error?
I compiled with this:
$ x86_64-w64-mingw32-gfortran -c main_read.f
$ x86_64-w64-mingw32-g++ -c cread.C
$ x86_64-w64-mingw32-gfortran -o read.exe main_read.o cread.o -lstdc++ -static
If I dont use -static, it complains 'libgfortran3.dll not found'.
I have a very simple C program called simple.c, and I want to use the LLVM toolchain to first produce IR Bitcode, then compile and link the bitcode myself.
This is what I currently do:
clang -O3 -emit-llvm simple.c -c -o simple.bc
llc -filetype=obj simple.bc <---- this is where it fails
simple.c
#include <stdio.h>
int main(void){
printf("Hello, World!\n");
return 0;
}
i can run the code when i compile it directly with clang, and i can run the bitcode with lli, however llc fails with this:
```C:\Users\Dvino\Desktop\hovet\hovet>llc -filetype=obj simple.bc
Stack dump:
0. Program arguments: llc -filetype=obj simple.bc
1. Running pass 'Function Pass Manager' on module 'simple.bc'.
2. Running pass 'Expand Atomic instructions' on function '#main'
#0 0x0fa3aed0 (C:\Windows\SYSTEM32\ucrtbased.dll+0x8aed0)
#1 0x0fa3d9ec (C:\Windows\SYSTEM32\ucrtbased.dll+0x8d9ec)
#2 0x0fa3dfc0 (C:\Windows\SYSTEM32\ucrtbased.dll+0x8dfc0)
#3 0x02800def (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x2430def)
#4 0x029a3490 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x25d3490)
#5 0x03f8b086 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x3bbb086)
#6 0x03f8b279 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x3bbb279)
#7 0x03f8ce06 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x3bbce06)
#8 0x03f8dba8 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x3bbdba8)
#9 0x00b84936 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x7b4936)
#10 0x00b7b056 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x7ab056)
#11 0x00b7b2d6 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x7ab2d6)
#12 0x00b78215 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x7a8215)
#13 0x00b84df6 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x7b4df6)
#14 0x00b86408 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x7b6408)
#15 0x01cc60d8 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x18f60d8)
#16 0x01cc4824 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x18f4824)
#17 0x01afa507 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x172a507)
#18 0x01a11eaf (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x1641eaf)
#19 0x01a0f0f6 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x163f0f6)
#20 0x02739ff3 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x2369ff3)
#21 0x02d448e2 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x29748e2)
#22 0x02d44bf4 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x2974bf4)
#23 0x02d45d52 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x2975d52)
#24 0x02d46595 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x2976595)
#25 0x02d3ff8d (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x296ff8d)
#26 0x006781a6 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x2a81a6)
#27 0x00678ed2 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x2a8ed2)
#28 0x044cde5e (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x40fde5e)
#29 0x044cdcf7 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x40fdcf7)
#30 0x044cdb8d (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x40fdb8d)
#31 0x044cded8 (C:\Users\Dvino\Desktop\hovet\hovet\llc.exe+0x40fded8)
#32 0x750f8494 (C:\Windows\System32\KERNEL32.DLL+0x18494)
#33 0x777f41c8 (C:\Windows\SYSTEM32\ntdll.dll+0x641c8)
#34 0x777f4198 (C:\Windows\SYSTEM32\ntdll.dll+0x64198)
```
Anyone successfully installed CSS::LESS on OS X?
For me it failed with many errors, like the next one:
$ make test
/Users/me/perl5/perlbrew/perls/perl-5.16.3/bin/perl Build --makefile_env_macros 1 test
t/00.load.t ................. 1/1 # Testing CSS::LESS 0.0.3
t/00.load.t ................. ok
t/10.dry-run.t ..............
# Failed test '"include_paths" parameter (set to constructor)'
# at t/10.dry-run.t line 20.
# 'lessc /var/folders/7l/nhyscwy14bjb_sxr_t2gynpm0000gn/T/RoPSlWoxEQ --include-path=/Users/me/.cpanm/work/1395039258.75205/CSS-LESS-v0.0.3/t/foo/:/bar/ --verbose --no-color'
# doesn't match '(?^:^lessc /tmp/\w+ --include-path=/Users/me/.cpanm/work/1395039258.75205/CSS-LESS-v0.0.3/t/foo/:/bar/ --verbose --no-color$)'
IMHO, this is a case of a wrong test expectations, because on OS X the tempfiles are created in the /var/folders/.... and not in the /tmp.
Similar error reports are in the www.cpantesters.org . EXPECT ONE here: http://www.cpantesters.org/cpan/report/dac3ce8e-3c79-11e3-aac4-3cf3dfeaf78b
Asking this question because if it is somewhat possible build the CSS::LESS os OS X would be happy to know - how.
EDIT
Hm, the above successful test report (and the Module itself) is strange, because
# Testing CSS::LESS 0.0.3
t/00.load.t ................. ok
t/10.dry-run.t .............. ok
t/90.lessc_compile.t ........ skipped: Not installed lessc
t/91.lessc_compile_error.t .. skipped: Not installed lessc
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - the module DEPENDS on 'lessc'
t/92.lessc_not-installed.t .. ok
All tests successful.
Files=5, Tests=8, 1 wallclock secs ( 0.03 usr 0.02 sys + 0.29 cusr 0.06 csys = 0.40 CPU)
Result: PASS
but, regardless of the missing lessc (what should be an error, because the module depends on it) the test
t/10.dry-run.t .............. ok
finished as OK - and on my system throws an error.
If someone care, my perl -V
Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
Platform:
osname=darwin, osvers=13.0.0, archname=darwin-thread-multi-2level
uname='darwin medvedik.local 13.0.0 darwin kernel version 13.0.0: thu sep 19 22:22:27 pdt 2013; root:xnu-2422.1.72~6release_x86_64 x86_64 '
config_args='-de -Dprefix=/Users/me/perl5/perlbrew/perls/perl-5.16.3 -Dcc=clang -Duse64bitall -Dusethreads -DDEBUGGING -Dusemultiplicity -Accflags=-DPERL_USE_SAFE_PUTENV -Aeval:scriptdir=/Users/me/perl5/perlbrew/perls/perl-5.16.3/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='clang', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -arch x86_64 -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
optimize='-O3 -g',
cppflags='-no-cpp-precomp -arch x86_64 -fno-common -DPERL_DARWIN -no-cpp-precomp -arch x86_64 -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
ccversion='', gccversion='4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc -arch x86_64', ldflags =' -arch x86_64 -fstack-protector -L/usr/local/lib -L/opt/local/lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib
libs=-lgdbm -ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV
PERL_TRACK_MEMPOOL PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
USE_PERL_ATOF USE_REENTRANT_API
Built under darwin
Compiled at Jan 6 2014 16:00:02
%ENV:
PERLBREW_BASHRC_VERSION="0.67"
PERLBREW_HOME="/Users/me/.perlbrew"
PERLBREW_MANPATH="/Users/me/perl5/perlbrew/perls/perl-5.16.3/man"
PERLBREW_PATH="/Users/me/perl5/perlbrew/bin:/Users/me/perl5/perlbrew/perls/perl-5.16.3/bin"
PERLBREW_PERL="perl-5.16.3"
PERLBREW_ROOT="/Users/me/perl5/perlbrew"
PERLBREW_VERSION="0.67"
#INC:
/Users/me/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/darwin-thread-multi-2level
/Users/me/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3
/Users/me/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level
/Users/me/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3
.
system:
Darwin marvin.local 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
compiler/gcc:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
Found myself a partial answer for the question.
The test is probably somewhat depends on the $TMPDIR shell variable. On OS X defaultly this wariable points to an directory what is unique to every logged user, and resides in the /var/folders/..., like this:
$ echo $TMPDIR
/var/folders/7l/nhyscwy14bjb_sxr_t2gynpm0000gn/T/
When manually changed the default value of $TMPDIR to /tmp, with:
TMPDIR=/tmp/
and run for CSS::LESS
perl Makefile.PL
make
make test
got
/Users/me/perl5/perlbrew/perls/perl-5.16.3/bin/perl Build --makefile_env_macros 1 test
t/00.load.t ................. 1/1 # Testing CSS::LESS 0.0.3
t/00.load.t ................. ok
t/10.dry-run.t .............. ok
t/90.lessc_compile.t ........ 2/?
# Failed test 'LESS compile test with compress'
# at t/90.lessc_compile.t line 19.
# got: 'a{border-bottom:solid 3px #000}div{width:100px}a:link{color:#1a1a1a}'
# expected: 'a{border-bottom:solid 3px #000}
# div{width:100px}
# a:link{color:#1a1a1a}
# '
# Looks like you failed 1 test of 3.
t/90.lessc_compile.t ........ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
t/91.lessc_compile_error.t .. ok
t/92.lessc_not-installed.t .. ok
Test Summary Report
-------------------
t/90.lessc_compile.t (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 2
Non-zero exit status: 1
Files=5, Tests=15, 2 wallclock secs ( 0.05 usr 0.02 sys + 1.46 cusr 0.35 csys = 1.88 CPU)
Result: FAIL
Failed 1/5 test programs. 1/15 subtests failed.
make: *** [test] Error 255
The subtest
t/10.dry-run.t .............. ok
is no problem anymore. Anyway the module didn't built - but throws another (lessc) error.
So, Neil Bower (a sumbitter of the "successful" test report) probably changed the $TMPDIR too. And because he hasn't installed the external command lessc got a successful result.
Demostration:
$ sudo mv /opt/local/bin/{lessc,lessc1} #rename lessc to lessc1
Password:
$ make test
/Users/me/perl5/perlbrew/perls/perl-5.16.3/bin/perl Build --makefile_env_macros 1 test
t/00.load.t ................. 1/1 # Testing CSS::LESS 0.0.3
t/00.load.t ................. ok
t/10.dry-run.t .............. ok
t/90.lessc_compile.t ........ skipped: Not installed lessc
t/91.lessc_compile_error.t .. skipped: Not installed lessc
t/92.lessc_not-installed.t .. ok
All tests successful.
Files=5, Tests=8, 1 wallclock secs ( 0.07 usr 0.03 sys + 0.56 cusr 0.11 csys = 0.77 CPU)
Result: PASS
Great :) - unfortunately - this is a FALSE result, and the CSS::LESS didn't builds OK on OS X.
I'm getting some "value temporarily unavailable, due to optimizations" problems, but I am compiling with debug enabled, as far as I know.
I.e. I'm using -g -O0 -fno-inline flags, so I'm not sure why is this still happening. Is it some flag I missed?
Compiler is g++-mp-4.6 (GCC) 4.6.3, OS is OSX 10.6 Darwin Palace-of-the-Nine-Moons.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
Full compile options are g++-mp-4.6 -Wall -Werror -Wno-unused -g -O0 -fno-inline -I/usr/local/include -I../allig -std=c++0x -c src/Toolbox.cpp -o o/Toolbox.o for every file.
gdb session:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000021
[Switching to process 23874]
0x0000000100035d64 in al_get_bitmap_width ()
(gdb) bt
#0 0x0000000100035d64 in al_get_bitmap_width ()
#1 0x0000000100005e47 in Icon::resize (this=0x101244530, w=<value temporarily unavailable, due to optimizations>, h=<value temporarily unavailable, due to optimizations>) at ../allig/Icon.cpp:24
#2 0x0000000100005e1f in Icon::create_icon (this=0x101244530, _icon_size=<value temporarily unavailable, due to optimizations>) at ../allig/Icon.cpp:20
#3 0x000000010000ae24 in Icontainer::add_icon (this=0x101244210, tt=0x101244530) at ../allig/Icontainer.cpp:18
#4 0x0000000100002d58 in _al_mangled_main (argc=1, argv=0x7fff5fbff600) at src/mapedit.cpp:202
#5 0x000000010009ff17 in +[AllegroAppDelegate app_main:] ()
#6 0x00007fff82d45114 in __NSThread__main__ ()
#7 0x00007fff81f4afd6 in _pthread_start ()
#8 0x00007fff81f4ae89 in thread_start ()
(gdb) up
#1 0x0000000100005e47 in Icon::resize (this=0x101244530, w=<value temporarily unavailable, due to optimizations>, h=<value temporarily unavailable, due to optimizations>) at ../allig/Icon.cpp:24
24 ow=al_get_bitmap_width(icon);
Current language: auto; currently c++
[...]
(gdb) up
#2 0x0000000100005e1f in Icon::create_icon (this=0x101244530, _icon_size=<value temporarily unavailable, due to optimizations>) at ../allig/Icon.cpp:20
20 resize(_icon_size,_icon_size);
(gdb) print _icon_size
$2 = <value temporarily unavailable, due to optimizations>
(gdb) up
#3 0x000000010000ae24 in Icontainer::add_icon (this=0x101244210, tt=0x101244530) at ../allig/Icontainer.cpp:18
18 tt->create_icon(icon_size);
(gdb) print icon_size
$3 = 32 ' '
(gdb) quit
code snippets:
void Icon::resize (unsigned char w, unsigned char h) {
unsigned short ow,oh;
ow=al_get_bitmap_width(icon);
up
void Icon::create_icon (unsigned char _icon_size) {
resize(_icon_size,_icon_size);
}
up
int Icontainer::add_icon (Icon *tt) {
int ret=icons.size();
tt->tool=TOOL_TILE;
tt->create_icon(icon_size);
finally here the icon size was available.
Trying to install it with RVM I get the following error:
> [2013-02-25 10:09:24] make CC = /usr/local/bin/gcc-4.2 LD = ld
> LDSHARED = /usr/local/bin/gcc-4.2 -dynamic -bundle CFLAGS = -O3
> -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2
> -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/libxslt/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/curl-ca-bundle/include -I/usr/local/opt/sqlite/include -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I. DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/libxslt/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/curl-ca-bundle/lib -L/usr/local/opt/sqlite/lib -fstack-protector -Wl,-u,_objc_msgSend SOLIBS = linking miniruby ld: warning: directory not found for option
> '-L/usr/local/opt/curl-ca-bundle/lib'
> /Users/ale/.rvm/src/ruby-2.0.0-p0/lib/fileutils.rb:111: [BUG] Stack
> consistency error (sp: 38, bp: 36) ruby 2.0.0p0 (2013-02-24 revision
> 39474) [x86_64-darwin12.2.0]
>
> -- Crash Report log information -------------------------------------------- See Crash Report log file under the one of following:
> * ~/Library/Logs/CrashReporter
> * /Library/Logs/CrashReporter
> * ~/Library/Logs/DiagnosticReports
> * /Library/Logs/DiagnosticReports the more detail of.
>
> -- Control frame information ----------------------------------------------- c:0006 p:0038 s:0038 e:000037 CLASS /Users/ale/.rvm/src/ruby-2.0.0-p0/lib/fileutils.rb:111
> c:0005 p:0035 s:0034 e:000033 CLASS
> /Users/ale/.rvm/src/ruby-2.0.0-p0/lib/fileutils.rb:107 c:0004 p:0009
> s:0032 e:000031 TOP
> /Users/ale/.rvm/src/ruby-2.0.0-p0/lib/fileutils.rb:85 [FINISH] c:0003
> p:---- s:0030 e:000029 CFUNC :require c:0002 p:0098 s:0026 E:001f68
> EVAL ./tool/mkconfig.rb:11 [FINISH] c:0001 p:0000 s:0002 E:001848
> TOP [FINISH]
>
> ./tool/mkconfig.rb:11:in `<main>' ./tool/mkconfig.rb:11:in `require'
> /Users/ale/.rvm/src/ruby-2.0.0-p0/lib/fileutils.rb:85:in `<top
> (required)>' /Users/ale/.rvm/src/ruby-2.0.0-p0/lib/fileutils.rb:107:in
> `<module:FileUtils>'
> /Users/ale/.rvm/src/ruby-2.0.0-p0/lib/fileutils.rb:111:in
> `<module:NoWrite>'
>
> -- C level backtrace information ------------------------------------------- 0 miniruby 0x0000000108465e24 rb_vm_bugreport + 164 1 miniruby
> 0x000000010833d95e report_bug + 302 2 miniruby
> 0x000000010833dc14 rb_bug + 180 3 miniruby
> 0x000000010845bea0 vm_exec_core + 32080 4 miniruby
> 0x000000010845c07e vm_exec + 94 5 miniruby
> 0x000000010845cf5a rb_iseq_eval + 266 6 miniruby
> 0x0000000108342572 rb_load_internal + 306 7 miniruby
> 0x0000000108343cc1 rb_require_safe + 1313 8 miniruby
> 0x000000010844bc54 call_cfunc_1 + 20 9 miniruby
> 0x0000000108452126 vm_call_cfunc + 1046 10 miniruby
> 0x0000000108460ce0 vm_call_method + 224 11 miniruby
> 0x0000000108457363 vm_exec_core + 12819 12 miniruby
> 0x000000010845c07e vm_exec + 94 13 miniruby
> 0x000000010845ce2e rb_iseq_eval_main + 206 14 miniruby
> 0x0000000108340cdf ruby_exec_internal + 111 15 miniruby
> 0x0000000108341cc2 ruby_run_node + 82 16 miniruby
> 0x00000001083080af main + 79 17 libdyld.dylib
> 0x00007fff8ae7b7e1 start + 0 18 ???
> 0x0000000000000009 0x0 + 9
>
> -- Other runtime information -----------------------------------------------
>
> * Loaded script: ./tool/mkconfig.rb
>
> * Loaded features:
>
> 0 enumerator.so
>
> [NOTE] You may have encountered a bug in the Ruby interpreter or
> extension libraries. Bug reports are welcome. For details:
> http://www.ruby-lang.org/bugreport.html
>
> make: *** [.rbconfig.time] Abort trap: 6
Is it working for anyone else?
did you try with CC=clang
I've installed on 10.7 without any problem just a minute ago.
rvm get head after 5pm London time today solved the problem. Guess Wayne has been fighting at it!
Ran rvm reinstall 2.0.0.
Still get find: -printf: unknown primary or operator on the rubygems installation, but the rest works.
Successfully installed here.
After removing my CC variable (was pointing to gcc-4.2) from .bash_profile and doing rvm get head && rvm requirements && rvm reinstall 2.0.0
But I get the rubygems install error.
Making some tests did not seem to be a problem. gem install works nice
I'm a little late here but had the same issue. I installed RVM and Ruby 2.0 with the following command and received the same error.
curl -L https://get.rvm.io | bash -s stable --ruby
Make sure to restart Terminal and then run rvm get head
Worked here.
This is fixed in the ruby 2.0 head. See the link to the specific issue below. As an alternative to pulling the head, you also fix the build issue by applying the simple patch described in the issue.
https://bugs.ruby-lang.org/issues/8171
Here's what I did that worked for me when "rvm install 2.0.0" failed.
Ensure that you have the latest Xcode installed from the App Store.
I then removed rvm with
rvm implode
And then reinstalled rvm (see rvm.io) with
curl -L https://get.rvm.io | bash -s stable
Then I did a
rvm install 2.0.0
which worked.