#46 Binary Crashes with MingW64 and OpenCL

closed-fixed
nobody
None
5
2010-10-03
2010-10-01
Anonymous
No

The program compiles/links and works with MingW32 compiler. On MingW64 Compiler, the compilation/linking works fine but the binary crashes. This doesnt seem a ATI Stream SDK bug as the MingW32 compiler generated Binary works fine.

Link to download ATI Stream : http://developer.amd.com/gpu/atistreamsdk/pages/default.aspx

----- Build Command -----

> g++ -IC:\Users\Chris\workspaceC++_64\OpenCL\includes -O0 -g3 -Wall -c -fmessage-length=0 -osrc\HelloWorld.o ..\src\HelloWorld.cpp
> g++ -LC:\Program Files (x86)\ATI Stream\lib\x86_64 -oOpenCL.exe src\HelloWorld.o -lOpenCL

Build complete for project OpenCL
Time consumed: 1470 ms.

------ Program Output -----

Hello, World!
Platform Vector Created

(Hangs here and then crashes)

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-10-01

    Testcase

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-10-01
    • assigned_to: nobody --> sezero
     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-10-01

    Sorry, This is the MingW64 Build I used
    mingw-w64-bin_x86_64-mingw_20100914_sezero.zip

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-02

    - Why did you assign me for this item? (don't even know your name).
    - Does any other build, ie. rubenvb's build or an automated build, result in a crash?
    - Please give us a backtrace so that we might have a clue as to what is going wrong.

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-02
    • assigned_to: sezero --> nobody
     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-02

    def file for x64 opencl.dll

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-02

    x64 opencl import library for mingw

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-02

    OK, the problem is somehow with ld not properly using the x64 msvc import library (opencl.lib). I generated opencl.def from x64 version of opencl.dll and made an import library (libopencl.a) from it, linked your test program with it and it ran just fine without any segmentation faults.

    Attached the defClosing this as fixed.

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-02

    OK, the problem is somehow with ld not properly using the x64 msvc import library (opencl.lib). I generated opencl.def from x64 version of opencl.dll and made an import library (libopencl.a) from it, linked your test program with it and it ran just fine without any segmentation faults.

    Attached the defClosing this as fixed.

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-02

    Attached the def file and the import library. Closing this as fixed.

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-02
    • status: open --> closed-fixed
     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-10-02

    My name is Saleel, I assigned to you as i downloaded your build. I had fixed the issue earlier by generating libopencl.a, Actually the bug was assigned to me from ATI forums and I has posted the solution. I was wondering why it works with Mingw32 and not Mingw64. Thanks Serzero.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-10-02
    • status: closed-fixed --> open-fixed
     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-03
    • status: open-fixed --> closed-fixed
     
  • Ozkan Sezer

    Ozkan Sezer - 2010-10-03

    Hi Saleel: As far as I know, ld does not recognize the ms object format it x64 import libs, hence the bad linkage for w64. Kai and Doug may answer better here, though. I was pointed to the ATI forum thread after I reached the same solution. Had I known about it earlier, this trackerd item might have been closed much earlier.

    Side note: Would it be possible for ATI to provide native libopencl.a files in future distributions? For the moment, I posted x86 and x64 import libraries at this post in our mailing list:
    https://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinxtfhTkyNjNi-MW67ik_D5MVdmnxzdcYfzijXo%40mail.gmail.com&forum_name=mingw-w64-public
    .. and I will be including them in my future builds, but it would be very nice if ATI provided them by itself.

    Thanks.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks