Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dlib doesn't build in either debug or release mode #955

Closed
ronniec95 opened this issue May 31, 2015 · 4 comments
Closed

dlib doesn't build in either debug or release mode #955

ronniec95 opened this issue May 31, 2015 · 4 comments
Labels

Comments

@ronniec95
Copy link

https://github.com/gecko0307/dlib

Doesn't appear to build with an assertion failure

Debug Mode

echo dlib\coding\huffman.d >Debug\dlib.build.rsp
echo dlib\coding\package.d >>Debug\dlib.build.rsp
echo dlib\coding\varint.d >>Debug\dlib.build.rsp
...
ldc2 -m64 -gc -X -Xf="Debug\dlib.json" -deps="Debug\dlib.dep" -c -od="Debug" @debug\dlib.build.rsp -oq
if errorlevel 1 goto reportError

echo huffman.obj >Debug\dlib.build.lnkarg
echo package.obj >>Debug\dlib.build.lnkarg
...
ar cru "Debug\dlib.lib" @debug\dlib.build.lnkarg

fails with

Assertion failed: (*p == 'e' || *p == 'E') && "Invalid character in significand", file D:\Temp\LDC-BUILD\src\llvm-3.6.0.src\lib\Support\APFloat.cpp, line 272

Release Mode

echo dlib\coding\huffman.d >Release\dlib.build.rsp
echo dlib\coding\package.d >>Release\dlib.build.rsp
echo dlib\coding\varint.d >>Release\dlib.build.rsp
...
"H:\apps\VisualD\pipedmd.exe" ldc2 -lib -m64 -release -X -Xf="Release\dlib.json" -deps="Release\dlib.dep" -of="Release\dlib.lib" -L/MAP:"Release\dlib.map" @Release\dlib.build.rsp

** fails with **

Assertion failed: !(Pair.first != Ty && Pair.second == Ty) && "mapping to a source type", file D:\Temp\LDC-BUILD\src\llvm-3.6.0.src\lib\Linker\LinkModules.cpp, line 265

This fails before getting to the linking step unlike Debug mode

Found the file that doesn't work:-

dlib.geometry.ray.d:
struct Ray
{
Vector3f p0;
Vector3f p1;
float t;

// Commenting out this constructor seems to fix the problem
this(Vector3f begin = Vector3f(), Vector3f end = Vector3f())
{
p0 = begin;
p1 = end;
}
}

@redstar
Copy link
Member

redstar commented May 31, 2015

Which version and operating system do you use?
The first failure looks like you are using Windows. The problem is fixed in the current development trunk merge-2.067.
The second failure is #821 and #855 which is an LLVM bug.

@redstar
Copy link
Member

redstar commented May 31, 2015

I checked ldc2 0.15.1 on Linux that dlib can be build in debug mode.

@ronniec95
Copy link
Author

Both errors on windows. OK will wait till milestone 0.15.2 release before checking again. Back to dmd on windows.

@kinke
Copy link
Member

kinke commented Apr 18, 2017

Latest dlib 0.10.1 can be built successfully with LDC 1.2-beta2 (both debug and release configs).

@kinke kinke closed this as completed Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants