Bug 55039 - shader_runner.c.obj : error LNK2001: unresolved external symbol _lround
Summary: shader_runner.c.obj : error LNK2001: unresolved external symbol _lround
Status: RESOLVED FIXED
Alias: None
Product: piglit
Classification: Unclassified
Component: infrastructure (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Windows (All)
: medium blocker
Assignee: Paul Berry
QA Contact: Eric Anholt
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-18 00:58 UTC by Vinson Lee
Modified: 2012-09-24 13:20 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2012-09-18 00:58:36 UTC
[ 44%] Building C object target_api/gl/tests/shaders/CMakeFiles/shader_runner.dir/shader_runner.c.obj
cl : Command line warning D9025 : overriding '/W3' with '/W4'
shader_runner.c
include\msvc\c99\stdbool.h(35) : warning C4005: 'bool' : macro redefinition
        tests\shaders\shader_runner.c(26) : see previous definition of 'bool'
tests\shaders\shader_runner.c(133) : warning C4013: 'lround' undefined; assuming extern returning int
tests\shaders\shader_runner.c(407) : warning C4244: 'function' : conversion from 'int' to 'float', possible loss of data
tests\shaders\shader_runner.c(424) : warning C4244: 'function' : conversion from 'int' to 'float', possible loss of data
tests\shaders\shader_runner.c(452) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
tests\shaders\shader_runner.c(469) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
tests\shaders\shader_runner.c(729) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
tests\shaders\shader_runner.c(1384) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
tests\shaders\shader_runner.c(1385) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
tests\shaders\shader_runner.c(1405) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
tests\shaders\shader_runner.c(1406) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
tests\shaders\shader_runner.c(1567) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
tests\shaders\shader_runner.c(1572) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
tests\shaders\shader_runner.c(289) : warning C4715: 'comparison_string' : not all control paths return a value
tests\shaders\shader_runner.c(270) : warning C4715: 'compare' : not all control paths return a value
Linking CXX executable ..\..\..\..\bin\shader_runner.exe
cl : Command line warning D9025 : overriding '/W3' with '/W4'

LINK : symbol '__imp__sprintf' is undefined; performing full link

LINK : symbol '_lround' is undefined; performing full link

shader_runner.c.obj : error LNK2001: unresolved external symbol _lround

..\..\..\..\bin\shader_runner.exe : fatal error LNK1120: 1 unresolved externals



fb14b0eb21c3fc0c688c5ba0085065740819a33e is the first bad commit
commit fb14b0eb21c3fc0c688c5ba0085065740819a33e
Author: Stuart Abercrombie <sabercrombie@chromium.org>
Date:   Mon Sep 10 17:55:04 2012 -0700

    Make shader_runner add a #version directive to shaders lacking one.
    
    The version number is taken from the GLSL version requirement, if there is one.
    
    This is part of the effort to make version handling more flexible for GLES.
    
    v2 (Paul Berry <stereotype441@gmail.com>): use strstr() to check
    whether a #version directive is already present, in case it isn't at
    the start of the shader.
    
    Reviewed-by: Paul Berry <stereotype441@gmail.com>

:040000 040000 884aea127aecae7ec93b419594718ba383072181 746bedc00bce45c889b47d1fd882f83646fa1ba2 M	tests
Comment 1 Paul Berry 2012-09-18 01:10:56 UTC
Argh, it looks like lround() isn't available on Windows.  I'll submit a patch to the list.  Vinson, feel free to commit it if it works, or let me know and I'll commit it tomorrow.
Comment 2 Paul Berry 2012-09-24 13:20:14 UTC
It looks like José independently fixed this bug:

commit 2d514f52ccff9f8dea42c60b6a989ad1af848618
Author: José Fonseca <jfonseca@vmware.com>
Date:   Thu Sep 20 15:06:09 2012 +0100

    Implement lround for MSVC.
    
    Should fix shader_runner build failure.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.