www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - sdlang-d can not link after updating to dmd 2.066

reply "Puming" <zhaopuming gmail.com> writes:
Hi,

I'm using sdlang-d version 0.8.4 
(http://code.dlang.org/packages/sdlang-d).

When I update dmd to version 2.066 today, I found that sdlang-d 
won't link, with these errors:

Undefined symbols for architecture x86_64:
   
"_D7sdlang_3ast3Tag103__T11MemberRangeTC7sdlang_3ast3TagVAyaa7_616c6c54616773VAyaa11_746167496e646963696573VAyaa5_5f74616773Z11MemberRange
1__invariantMxFZv", 
referenced from:
       
_D7sdlang_3ast3Tag103__T11MemberRangeTC7sdlang_3ast3TagVAyaa7_616c6c54616773VAyaa11_746167496e646963696573VAyaa5_5f74616773Z11MemberRange30__T13opBinaryRightVAyaa2_696eZ13
pBinaryRightMFAyaZb 
in haha.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to 
see invocation)

I'm using Mac OSX. Do you have similar issue?

I reduced code to this:

```d
import std.stdio;
import sdlang;

void main()
{
	auto cfg = parseFile("hello.sdl");
	Tag t = cfg.tags["name"][0];
	writeln(t);
}
```

I'm wondering sdlang-d needs an update. Or is there a new project 
about sdlang?(heard about SDL becoming official in dub, wondering 
how dub is parsing SDL).
Aug 27 2014
next sibling parent "Dicebot" <public dicebot.lv> writes:
May be dub issue not taken updated compiler into consideration 
and not rebuilding the deps. Try forcing it.
Aug 27 2014
prev sibling parent reply "Israel" <tl12000 live.com> writes:
It looks fine here, OSX 10.9.4

"sdlang-d": ">=0.8.4"

Im using DUB RC2 though
Aug 27 2014
parent reply "Puming" <zhaopuming gmail.com> writes:
I updated dub to 0.9.22 and still got the same error...

THis is the output of `dub build --force`:

--- output ---



The following compiler flags have been specified in the package 
description
file. They are handled by DUB and direct use in packages is 
discouraged.
Alternatively, you can set the DFLAGS environment variable to 
pass custom flags
to the compiler, or use one of the suggestions below:

-wi: Use the "buildRequirements" field to control warning behavior




The following compiler flags have been specified in the package 
description
file. They are handled by DUB and direct use in packages is 
discouraged.
Alternatively, you can set the DFLAGS environment variable to 
pass custom flags
to the compiler, or use one of the suggestions below:

-debug: Call dub with --build=debug
-unittest: Call dub with --build=unittest




The following compiler flags have been specified in the package 
description
file. They are handled by DUB and direct use in packages is 
discouraged.
Alternatively, you can set the DFLAGS environment variable to 
pass custom flags
to the compiler, or use one of the suggestions below:

-wi: Use the "buildRequirements" field to control warning behavior




The following compiler flags have been specified in the package 
description
file. They are handled by DUB and direct use in packages is 
discouraged.
Alternatively, you can set the DFLAGS environment variable to 
pass custom flags
to the compiler, or use one of the suggestions below:

-debug: Call dub with --build=debug
-unittest: Call dub with --build=unittest

Building sdlang-d 0.8.4 configuration "library", build type debug.
Running dmd...
Building haha ~master configuration "application", build type 
debug.
Compiling using dmd...
Linking...
Undefined symbols for architecture x86_64:
   
"_D7sdlang_3ast3Tag103__T11MemberRangeTC7sdlang_3ast3TagVAyaa7_616c6c54616773VAyaa11_746167496e646963696573VAyaa5_5f74616773Z11MemberRange
1__invariantMxFZv", 
referenced from:
       
_D7sdlang_3ast3Tag103__T11MemberRangeTC7sdlang_3ast3TagVAyaa7_616c6c54616773VAyaa11_746167496e646963696573VAyaa5_5f74616773Z11MemberRange30__T13opBinaryRightVAyaa2_696eZ13
pBinaryRightMFAyaZb 
in haha.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to 
see invocation)
--- errorlevel 1
FAIL 
.dub/build/application-debug-posix.osx-x86_64-dmd-561BEB9B9938B
39E9AD2177AB127CD0/ 
haha executable
Error executing command build: dmd failed with exit code 1.

-- end ---


On Wednesday, 27 August 2014 at 16:35:18 UTC, Israel wrote:
 It looks fine here, OSX 10.9.4

 "sdlang-d": ">=0.8.4"

 Im using DUB RC2 though
Aug 28 2014
parent "Uranuz" <neuranuz gmail.com> writes:
On Thursday, 28 August 2014 at 10:16:15 UTC, Puming wrote:
 I updated dub to 0.9.22 and still got the same error...

 THis is the output of `dub build --force`:

 --- output ---



 The following compiler flags have been specified in the package 
 description
 file. They are handled by DUB and direct use in packages is 
 discouraged.
 Alternatively, you can set the DFLAGS environment variable to 
 pass custom flags
 to the compiler, or use one of the suggestions below:

 -wi: Use the "buildRequirements" field to control warning 
 behavior




 The following compiler flags have been specified in the package 
 description
 file. They are handled by DUB and direct use in packages is 
 discouraged.
 Alternatively, you can set the DFLAGS environment variable to 
 pass custom flags
 to the compiler, or use one of the suggestions below:

 -debug: Call dub with --build=debug
 -unittest: Call dub with --build=unittest




 The following compiler flags have been specified in the package 
 description
 file. They are handled by DUB and direct use in packages is 
 discouraged.
 Alternatively, you can set the DFLAGS environment variable to 
 pass custom flags
 to the compiler, or use one of the suggestions below:

 -wi: Use the "buildRequirements" field to control warning 
 behavior




 The following compiler flags have been specified in the package 
 description
 file. They are handled by DUB and direct use in packages is 
 discouraged.
 Alternatively, you can set the DFLAGS environment variable to 
 pass custom flags
 to the compiler, or use one of the suggestions below:

 -debug: Call dub with --build=debug
 -unittest: Call dub with --build=unittest

 Building sdlang-d 0.8.4 configuration "library", build type 
 debug.
 Running dmd...
 Building haha ~master configuration "application", build type 
 debug.
 Compiling using dmd...
 Linking...
 Undefined symbols for architecture x86_64:
   
 "_D7sdlang_3ast3Tag103__T11MemberRangeTC7sdlang_3ast3TagVAyaa7_616c6c54616773VAyaa11_746167496e646963696573VAyaa5_5f74616773Z11MemberRange
1__invariantMxFZv", 
 referenced from:
       
 _D7sdlang_3ast3Tag103__T11MemberRangeTC7sdlang_3ast3TagVAyaa7_616c6c54616773VAyaa11_746167496e646963696573VAyaa5_5f74616773Z11MemberRange30__T13opBinaryRightVAyaa2_696eZ13
pBinaryRightMFAyaZb 
 in haha.o
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to 
 see invocation)
 --- errorlevel 1
 FAIL 
 .dub/build/application-debug-posix.osx-x86_64-dmd-561BEB9B9938B
39E9AD2177AB127CD0/ 
 haha executable
 Error executing command build: dmd failed with exit code 1.

 -- end ---


 On Wednesday, 27 August 2014 at 16:35:18 UTC, Israel wrote:
 It looks fine here, OSX 10.9.4

 "sdlang-d": ">=0.8.4"

 Im using DUB RC2 though
I get strange link errors when using scoped imports sometimes. It's often in the case when scoped import placed at the same nesting level as ising some symbol from imported module. I don't know exactly what happens here, but most of cases that I faced is about it. Other possibility is connected with calling abstract methods in classes.
Aug 29 2014