www.digitalmars.com         C & C++   DMDScript  

D.gnu - gdc git compiling failed on ArchLinux amd64

reply dangbinghoo <dangbinghoo gmail.com> writes:
hi all,

in Archlinux, I tried to build gdc-10(git version), but it failed:

```
gdc -no-pie -lstdc++   -g -DIN_GCC     -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wno-format 
-Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   
-DHAVE_CONFIG_H -static-libstdc++ -static-libgcc 
-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o d21 \
	d/aav.o d/access.o d/aggregate.o d/aliasthis.o d/apply.o 
d/array.o d/arrayop.o d/arraytypes.o d/attrib.o d/ast_node.o 
d/astcodegen.o d/blockexit.o d/builtin.o d/canthrow.o d/clone.o 
d/compiler.o d/complex.o d/cond.o d/constfold.o d/cppmangle.o 
d/ctfeexpr.o d/ctfloat.o d/ctorflow.o d/dcast.o d/dclass.o 
d/declaration.o d/delegatize.o d/denum.o d/dimport.o 
d/dinterpret.o d/dmacro.o d/dmangle.o d/dmodule.o d/doc.o 
d/dscope.o d/dstruct.o d/dsymbol.o d/dsymbolsem.o d/dtemplate.o 
d/dversion.o d/entity.o d/errors.o d/escape.o d/expression.o 
d/expressionsem.o d/file.o d/filename.o d/func.o d/globals.o 
d/gluelayer.o d/hash.o d/hdrgen.o d/iasm.o d/iasmgcc.o d/id.o 
d/identifier.o d/impcnvtab.o d/imphint.o d/init.o d/initsem.o 
d/inline.o d/intrange.o d/json.o d/lambdacomp.o d/lexer.o 
d/longdouble.o d/mtype.o d/nogc.o d/nspace.o d/objc.o d/opover.o 
d/optimize.o d/outbuffer.o d/parse.o d/parsetimevisitor.o 
d/permissivevisitor.o d/port.o d/printast.o d/rmem.o 
d/rootobject.o d/safe.o d/sapply.o d/semantic2.o d/semantic3.o 
d/sideeffect.o d/speller.o d/statement.o 
d/statement_rewrite_walker.o d/statementsem.o d/staticassert.o 
d/staticcond.o d/stringtable.o d/target.o d/templateparamsem.o 
d/tokens.o d/traits.o d/transitivevisitor.o d/typesem.o 
d/typinf.o d/utf.o d/utils.o d/visitor.o d/d-attribs.o 
d/d-builtins.o d/d-codegen.o d/d-convert.o d/d-diagnostic.o 
d/d-frontend.o d/d-incpath.o d/d-lang.o d/d-longdouble.o 
d/d-target.o d/decl.o d/expr.o d/imports.o d/intrinsics.o 
d/modules.o d/runtime.o d/toir.o d/typeinfo.o d/types.o i386-d.o 
glibc-d.o attribs.o libbackend.a main.o libcommon-target.a 
libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a 
libcommon.a ../libcpp/libcpp.a   
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a 
../libdecnumber/libdecnumber.a  
-L/media/Devel/Yaourt/build/gdc-git/src/gcc-build/./isl/.libs  
-lisl -lmpc -lmpfr -lgmp -rdynamic -ldl  -lz
ld: d/file.o: in function `File::read(char const*)':
file.d:(.text+0x362): undefined reference to 
`_D4core4stdc5errno5errnoFNbNdNiNeZi'
ld: file.d:(.text+0x3b2): undefined reference to 
`_D4core4stdc5errno5errnoFNbNdNiNeZi'
ld: file.d:(.text+0x402): undefined reference to 
`_D4core4stdc5errno5errnoFNbNdNiNeZi'
ld: d/filename.o: in function 
`_D3dmd4root8filename8FileName16ensurePathExistsFNbAxaZb':
filename.d:(.text+0x1653): undefined reference to 
`_D4core4stdc5errno5errnoFNbNdNiNeiZi'
ld: filename.d:(.text+0x166c): undefined reference to 
`_D4core4stdc5errno5errnoFNbNdNiNeZi'
ld: d/globals.o: in function 
`_D3dmd7globals3Loc6toHashMxFNaNbNeZm':
globals.d:(.text+0x20c6): undefined reference to 
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
ld: globals.d:(.text+0x20d8): undefined reference to 
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
ld: d/globals.o: in function 
`_D6object14__T6hashOfTxkZ6hashOfFNaNbNfKxkmZm':
globals.d:(.text._D6object14__T6hashOfTxkZ6hashOfFNaNbNfKxkmZm[_D6object14__T6hashOfTxkZ6hashOf
NaNbNfKxkmZm]+0xa): undefined reference to
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
ld: d/globals.o: in function 
`_D6object15__T6hashOfTAxaZ6hashOfFNaNbNiAxamZm':
globals.d:(.text._D6object15__T6hashOfTAxaZ6hashOfFNaNbNiAxamZm[_D6object15__T6hashOfTAxaZ6hashOf
NaNbNiAxamZm]+0xb): undefined reference to
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
ld: d/globals.o: in function 
`_D4core8internal4hash14__T6hashOfTxkZ6hashOfFNaNbNeKxkmZm':
globals.d:(.text._D4core8internal4hash14__T6hashOfTxkZ6hashOfFNaNbNeKxkmZm[_D4core8internal4hash14__T6hashOfTxkZ6hashOf
NaNbNeKxkmZm]+0xa): undefined reference to
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
ld: 
d/globals.o:globals.d:(.text._D4core8internal4hash15__T6hashOfTAxaZ6hashOfFNaNbNiKAxamZm[_D4core8internal4hash15__T6hashOfTAxaZ6hashOfF
aNbNiKAxamZm]+0xc): more undefined references to
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm' follow
ld: d/printast.o: in function 
`PrintASTVisitor::visit(Expression*)':
printast.d:(.text+0x21): undefined reference to 
`_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
ld: d/printast.o: in function `PrintASTVisitor::visit(UnaExp*)':
printast.d:(.text+0xb1): undefined reference to 
`_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
ld: d/printast.o: in function `PrintASTVisitor::visit(BinExp*)':
printast.d:(.text+0x182): undefined reference to 
`_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
ld: d/printast.o: in function 
`PrintASTVisitor::visit(DelegateExp*)':
printast.d:(.text+0x261): undefined reference to 
`_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
ld: printast.d:(.text+0x2c1): undefined reference to 
`_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
ld: d/printast.o:printast.d:(.text+0x331): more undefined 
references to 
`_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi' 
follow
make[3]: *** 
[/media/Devel/Yaourt/build/gdc-git/src/gcc/gcc/d/Make-lang.in:189:d21] Error 1

```

the gdc used to building GDC10-git is gdc-9.1.0 static version 
from Archlinux AUR package gdc-static.

Thanks!

---
binghoo dang
Aug 13 2019
next sibling parent reply Iain Buclaw <ibuclaw gdcproject.org> writes:
On Wed, 14 Aug 2019 at 07:35, dangbinghoo via D.gnu <d.gnu puremagic.com> wrote:
 hi all,

 in Archlinux, I tried to build gdc-10(git version), but it failed:

 ```
 gdc -no-pie -lstdc++   -g -DIN_GCC     -fno-exceptions -fno-rtti
 -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
 -Wwrite-strings -Wcast-qual -Wno-format
 -Wmissing-format-attribute -Woverloaded-virtual -pedantic
 -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
 -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc
 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o d21 \
         d/aav.o d/access.o d/aggregate.o d/aliasthis.o d/apply.o
 d/array.o d/arrayop.o d/arraytypes.o d/attrib.o d/ast_node.o
 d/astcodegen.o d/blockexit.o d/builtin.o d/canthrow.o d/clone.o
 d/compiler.o d/complex.o d/cond.o d/constfold.o d/cppmangle.o
 d/ctfeexpr.o d/ctfloat.o d/ctorflow.o d/dcast.o d/dclass.o
 d/declaration.o d/delegatize.o d/denum.o d/dimport.o
 d/dinterpret.o d/dmacro.o d/dmangle.o d/dmodule.o d/doc.o
 d/dscope.o d/dstruct.o d/dsymbol.o d/dsymbolsem.o d/dtemplate.o
 d/dversion.o d/entity.o d/errors.o d/escape.o d/expression.o
 d/expressionsem.o d/file.o d/filename.o d/func.o d/globals.o
 d/gluelayer.o d/hash.o d/hdrgen.o d/iasm.o d/iasmgcc.o d/id.o
 d/identifier.o d/impcnvtab.o d/imphint.o d/init.o d/initsem.o
 d/inline.o d/intrange.o d/json.o d/lambdacomp.o d/lexer.o
 d/longdouble.o d/mtype.o d/nogc.o d/nspace.o d/objc.o d/opover.o
 d/optimize.o d/outbuffer.o d/parse.o d/parsetimevisitor.o
 d/permissivevisitor.o d/port.o d/printast.o d/rmem.o
 d/rootobject.o d/safe.o d/sapply.o d/semantic2.o d/semantic3.o
 d/sideeffect.o d/speller.o d/statement.o
 d/statement_rewrite_walker.o d/statementsem.o d/staticassert.o
 d/staticcond.o d/stringtable.o d/target.o d/templateparamsem.o
 d/tokens.o d/traits.o d/transitivevisitor.o d/typesem.o
 d/typinf.o d/utf.o d/utils.o d/visitor.o d/d-attribs.o
 d/d-builtins.o d/d-codegen.o d/d-convert.o d/d-diagnostic.o
 d/d-frontend.o d/d-incpath.o d/d-lang.o d/d-longdouble.o
 d/d-target.o d/decl.o d/expr.o d/imports.o d/intrinsics.o
 d/modules.o d/runtime.o d/toir.o d/typeinfo.o d/types.o i386-d.o
 glibc-d.o attribs.o libbackend.a main.o libcommon-target.a
 libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a
 libcommon.a ../libcpp/libcpp.a
 ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
 ../libdecnumber/libdecnumber.a
 -L/media/Devel/Yaourt/build/gdc-git/src/gcc-build/./isl/.libs
 -lisl -lmpc -lmpfr -lgmp -rdynamic -ldl  -lz
 ld: d/file.o: in function `File::read(char const*)':
 file.d:(.text+0x362): undefined reference to
 `_D4core4stdc5errno5errnoFNbNdNiNeZi'
 ld: file.d:(.text+0x3b2): undefined reference to
 `_D4core4stdc5errno5errnoFNbNdNiNeZi'
 ld: file.d:(.text+0x402): undefined reference to
 `_D4core4stdc5errno5errnoFNbNdNiNeZi'
 ld: d/filename.o: in function
 `_D3dmd4root8filename8FileName16ensurePathExistsFNbAxaZb':
 filename.d:(.text+0x1653): undefined reference to
 `_D4core4stdc5errno5errnoFNbNdNiNeiZi'
 ld: filename.d:(.text+0x166c): undefined reference to
 `_D4core4stdc5errno5errnoFNbNdNiNeZi'
 ld: d/globals.o: in function
 `_D3dmd7globals3Loc6toHashMxFNaNbNeZm':
 globals.d:(.text+0x20c6): undefined reference to
 `_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
 ld: globals.d:(.text+0x20d8): undefined reference to
 `_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
 ld: d/globals.o: in function
 `_D6object14__T6hashOfTxkZ6hashOfFNaNbNfKxkmZm':
 globals.d:(.text._D6object14__T6hashOfTxkZ6hashOfFNaNbNfKxkmZm[_D6object14__T6hashOfTxkZ6hashOf
NaNbNfKxkmZm]+0xa): undefined reference to
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
 ld: d/globals.o: in function
 `_D6object15__T6hashOfTAxaZ6hashOfFNaNbNiAxamZm':
 globals.d:(.text._D6object15__T6hashOfTAxaZ6hashOfFNaNbNiAxamZm[_D6object15__T6hashOfTAxaZ6hashOf
NaNbNiAxamZm]+0xb): undefined reference to
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
 ld: d/globals.o: in function
 `_D4core8internal4hash14__T6hashOfTxkZ6hashOfFNaNbNeKxkmZm':
 globals.d:(.text._D4core8internal4hash14__T6hashOfTxkZ6hashOfFNaNbNeKxkmZm[_D4core8internal4hash14__T6hashOfTxkZ6hashOf
NaNbNeKxkmZm]+0xa): undefined reference to
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm'
 ld:
 d/globals.o:globals.d:(.text._D4core8internal4hash15__T6hashOfTAxaZ6hashOfFNaNbNiKAxamZm[_D4core8internal4hash15__T6hashOfTAxaZ6hashOfF
aNbNiKAxamZm]+0xc): more undefined references to
`_D4core8internal4hash9bytesHashFNaNbNiPxvmmZm' follow
 ld: d/printast.o: in function
 `PrintASTVisitor::visit(Expression*)':
 printast.d:(.text+0x21): undefined reference to
 `_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
 ld: d/printast.o: in function `PrintASTVisitor::visit(UnaExp*)':
 printast.d:(.text+0xb1): undefined reference to
 `_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
 ld: d/printast.o: in function `PrintASTVisitor::visit(BinExp*)':
 printast.d:(.text+0x182): undefined reference to
 `_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
 ld: d/printast.o: in function
 `PrintASTVisitor::visit(DelegateExp*)':
 printast.d:(.text+0x261): undefined reference to
 `_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
 ld: printast.d:(.text+0x2c1): undefined reference to
 `_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
 ld: d/printast.o:printast.d:(.text+0x331): more undefined
 references to
 `_D4core4stdc5stdio4putcFNbNiNeiPOS4core4stdc5stdio8_IO_FILEZi'
 follow
 make[3]: ***
 [/media/Devel/Yaourt/build/gdc-git/src/gcc/gcc/d/Make-lang.in:189:d21] Error
1

 ```

 the gdc used to building GDC10-git is gdc-9.1.0 static version
 from Archlinux AUR package gdc-static.
You'd only ever get those linker messages if the version of libphobos installed was compiled by another compiler, or older version of gdc (most likely gdc-8, which isn't part of gcc officially). -- Iain
Aug 14 2019
parent reply dangbinghoo <dangbinghoo gmail.com> writes:
On Wednesday, 14 August 2019 at 08:15:16 UTC, Iain Buclaw wrote:
 On Wed, 14 Aug 2019 at 07:35, dangbinghoo via D.gnu 
 <d.gnu puremagic.com> wrote:
 the gdc used to building GDC10-git is gdc-9.1.0 static version 
 from Archlinux AUR package gdc-static.
You'd only ever get those linker messages if the version of libphobos installed was compiled by another compiler, or older version of gdc (most likely gdc-8, which isn't part of gcc officially).
hi Iain, thanks for explaining, I just used gdc-9.1.0, and the libgphobos was installed by the same package which built from gdc-static in ArchLinux's AUR repo. don't know what the problem is. Thanks!
Aug 21 2019
parent reply Daniel =?UTF-8?B?S296w6Fr?= <kozzi11 gmail.com> writes:
On Thursday, 22 August 2019 at 02:23:57 UTC, dangbinghoo wrote:
 On Wednesday, 14 August 2019 at 08:15:16 UTC, Iain Buclaw wrote:
 On Wed, 14 Aug 2019 at 07:35, dangbinghoo via D.gnu 
 <d.gnu puremagic.com> wrote:
 the gdc used to building GDC10-git is gdc-9.1.0 static 
 version from Archlinux AUR package gdc-static.
You'd only ever get those linker messages if the version of libphobos installed was compiled by another compiler, or older version of gdc (most likely gdc-8, which isn't part of gcc officially).
hi Iain, thanks for explaining, I just used gdc-9.1.0, and the libgphobos was installed by the same package which built from gdc-static in ArchLinux's AUR repo. don't know what the problem is. Thanks!
This is wierd it should work, if you are able to try to change gdc-git PKGBUILD, can you please try to change --enable-bootstrap (https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gdc-git#n93) to --disable-bootstrap
Aug 23 2019
parent reply Daniel =?UTF-8?B?S296w6Fr?= <kozzi11 gmail.com> writes:
On Friday, 23 August 2019 at 08:22:16 UTC, Daniel Kozák wrote:
 On Thursday, 22 August 2019 at 02:23:57 UTC, dangbinghoo wrote:
 hi Iain,

 thanks for explaining, I just used gdc-9.1.0, and the 
 libgphobos was installed by the same package which built from 
 gdc-static in ArchLinux's AUR repo.

 don't know what the problem is.


 Thanks!
This is wierd it should work, if you are able to try to change gdc-git PKGBUILD, can you please try to change --enable-bootstrap (https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gdc-git#n93) to --disable-bootstrap
Maybe you have some old files somewhere, please try to remove all gdc packages gdc, libgphobos and verify there is no gdc files in your system for eg. there should bo no /usr/include/d/gdc or /usr/lib/libgphobos.* Than you can try to build gdc-static again and then gdc-git
Aug 23 2019
parent Daniel =?UTF-8?B?S296w6Fr?= <kozzi11 gmail.com> writes:
On Friday, 23 August 2019 at 08:28:52 UTC, Daniel Kozák wrote:
 Maybe you have some old files somewhere, please try to remove 
 all gdc packages gdc, libgphobos and verify there is no gdc 
 files in your system for eg. there should bo no 
 /usr/include/d/gdc or /usr/lib/libgphobos.* Than you can try to 
 build gdc-static again and then gdc-git
* type it should be /usr/include/dlang/gdc
Aug 23 2019
prev sibling parent reply Daniel Kozak <kozzi11 gmail.com> writes:
On Wednesday, 14 August 2019 at 05:34:48 UTC, dangbinghoo wrote:
 hi all,

 in Archlinux, I tried to build gdc-10(git version), but it 
 failed:
 ...
 the gdc used to building GDC10-git is gdc-9.1.0 static version 
 from Archlinux AUR package gdc-static.

 Thanks!

 ---
 binghoo dang
Hi I am the one who created gdc-static on AUR. What do you mean by gdc-10(git version) it is this package: https://aur.archlinux.org/packages/gdc-git/ ? Or something else?
Aug 16 2019
parent dangbinghoo <dangbinghoo gmail.com> writes:
On Friday, 16 August 2019 at 10:59:13 UTC, Daniel Kozak wrote:
 On Wednesday, 14 August 2019 at 05:34:48 UTC, dangbinghoo wrote:
 hi all,

 in Archlinux, I tried to build gdc-10(git version), but it 
 failed:
 ...
 the gdc used to building GDC10-git is gdc-9.1.0 static version 
 from Archlinux AUR package gdc-static.

 Thanks!

 ---
 binghoo dang
Hi I am the one who created gdc-static on AUR. What do you mean by gdc-10(git version) it is this package: https://aur.archlinux.org/packages/gdc-git/ ? Or something else?
hi , I just followed the comment is gdc-git AUR package comments, which is : ``` kozzi commented on 2019-08-07 12:41 To build this package you need to have working gdc compiler, because gdc in [community] is broken right now and will be until https://aur.archlinux.org/packages/gdc-static/ ``` And then, I got the failed linking. Thanks! --- Binghoo Dang
Aug 21 2019