Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Comments

fix Issue 303: libgphobos.spec not found linking stage2#724

Merged
ibuclaw merged 4 commits intoD-Programming-GDC:masterfrom
ibuclaw:fixbootstrap
Aug 29, 2018
Merged

fix Issue 303: libgphobos.spec not found linking stage2#724
ibuclaw merged 4 commits intoD-Programming-GDC:masterfrom
ibuclaw:fixbootstrap

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Aug 28, 2018

  1. Error libgphobos.spec not found.
gdc: error: libgphobos.spec: No such file or directory

Link command was missing -B option to prev-target/libphobos/src in POSTSTAGE1_HOST_EXPORTS, and so it was using the host installed copy if found. The error occurs if libgphobos.spec is not found on the host either.

Bug fix: https://bugzilla.gdcproject.org/show_bug.cgi?id=303


  1. Error undefined references to recently added druntime symbols.
d: d/dmodule.o:(.data.rel.ro._D3dmd5parse__T6ParserTS3dmd10astcodegen10ASTCodegenZQBm6__vtblZ[_D3dmd5parse__T6ParserTS3dmd10astcodegen10ASTCodegenZQBm6__vtblZ]+0x18): undefined reference to `_D6object6Object5opCmpMFCQqZi'
ld: d/dmodule.o:(.data.rel.ro._D3dmd5parse__T6ParserTS3dmd10astcodegen10ASTCodegenZQBm6__vtblZ[_D3dmd5parse__T6ParserTS3dmd10astcodegen10ASTCodegenZQBm6__vtblZ]+0x20): undefined reference to `_D6object6Object8opEqualsMFCQtZb'
ld: d/filename.o: in function `FileName::searchPath(Array<char const*>*, char const*, bool)':
gcc/d/dmd/root/filename.d:611: undefined reference to `_D4core3sys5posixQk4stat7S_ISDIRFNbNikZb'
ld: gcc/d/dmd/root/filename.d:611: undefined reference to `_D4core3sys5posixQk4stat7S_ISDIRFNbNikZb'
ld: d/filename.o: in function `FileName::exists(char const*)':
gcc/d/dmd/root/filename.d:611: undefined reference to `_D4core3sys5posixQk4stat7S_ISDIRFNbNikZb'
ld: d/filename.o: in function `FileName::safeSearchPath(Array<char const*>*, char const*)':
gcc/d/dmd/root/filename.d:611: undefined reference to `_D4core3sys5posixQk4stat7S_ISDIRFNbNikZb'
ld: d/filename.o: in function `FileName::ensurePathExists(char const*) [clone .localalias.0]':
gcc/d/dmd/root/filename.d:611: undefined reference to `_D4core3sys5posixQk4stat7S_ISDIRFNbNikZb'

Link command was missing -L option to prev-target/libphobos/libdruntime/.libs in POSTSTAGE1_HOST_EXPORTS, and so it was linking against the host installed copy of libgdruntime, which is a different version to the one being built.


  1. Stage 2 fails to build after merging Update to dmd master 20180824 #704 (if I understand write) due to changes to __c_long definition.
gcc/d/dmd/root/longdouble.d:30:5: note: ‘dmd.root.longdouble.longdouble.__ctor(T)(T r)’
     this(T)(T r)
     ^
gcc/d/dmd/dcast.d:381:52: error: cannot cast expression ‘cast(long)value’ of type ‘long’ to ‘longdouble’
                 const f = cast(T) cast(sinteger_t) value;
                                                    ^
gcc/d/dmd/dcast.d:459:22: error: template instance ‘dmd.dcast.implicitConvTo.ImplicitConvTo.visit.isLosslesslyConvertibleToFP!(longdouble)’ error instantiating
                 if (!isLosslesslyConvertibleToFP!real_t)
                      ^

See: dlang/dmd#8632
Bug fix: https://bugzilla.gdcproject.org/show_bug.cgi?id=301


  1. Fix gagged warning discovered when debugging [3].
gcc/d/dmd/root/longdouble.d:28:1: anachronism: ‘dmd.root.longdouble.longdouble.opAssign’ called with argument types ‘(longdouble)’ matches both:
   gcc/d/dmd/root/longdouble.d:36:16:     ‘dmd.root.longdouble.longdouble.opAssign!(longdouble).opAssign(longdouble r)’
and:
   gcc/d/dmd/root/longdouble.d:43:16:     ‘dmd.root.longdouble.longdouble.opAssign!(longdouble).opAssign(longdouble r)’
28 | struct longdouble
   | ^

  1. Error cannot find libstdc++
ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make[3]: *** [../../gcc/d/Make-lang.in:191: cc1d] Error 1

Link command was missing -L option to prev-target/libstdc++-v3/src/.libs in POSTSTAGE1_HOST_EXPORTS, and so it was using the host installed copy if found. The error occurs if libstdc++ is not found on the host.

@MoritzMaxeiner
Copy link

Works for me

@ibuclaw ibuclaw merged commit 5f64437 into D-Programming-GDC:master Aug 29, 2018
@ibuclaw ibuclaw deleted the fixbootstrap branch August 29, 2018 07:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants