Re: linker error on MinGW build

Ryan Pavlik <[email protected]> Fri, 12 Apr 2013 12:46:35 -0500
Newsgroups gmane.comp.lib.openal
Message-ID <CABMFTE9vsE=NU3AK02XQSMXZVnBq+YdXiq3sPaMF=pwigOppuw@mail.gmail.com>
--===============1790092578==
Content-Type: multipart/alternative; boundary=047d7b2e0b8d02c9f604da2d7c00

--047d7b2e0b8d02c9f604da2d7c00
Content-Type: text/plain; charset=ISO-8859-1

Those are GCC atomic intrinsics, so it's a bit strange to see them in a
linker error.  What version of GCC are you using in mingw? (What build of
mingw are you using? I'm pretty sure I cross-compile continuously with mxe)

Ryan


On Thu, Apr 11, 2013 at 6:02 PM, Philipp Kraus
<[email protected]>wrote:

> Hello,
>
> I try to build OpenAL under MinGW and get the linker errors:
>
> Linking C shared library OpenAL32.dll
> Creating library file: libOpenAL32.dll.a
> CMakeFiles\OpenAL32.dir/objects.a(alError.obj):alError.c:(.text+0x27):
> undefined  reference to `__sync_bool_compare_and_swap_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x24c): undefined
> reference to `__sync_bool_compare_and_swap_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0xff1): undefined
> reference to `__sync_bool_compare_and_swap_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x14cd): undefined
> reference to `__sync_bool_compare_and_swap_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x20d8): undefined
> reference to `__sync_add_and_fetch_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x2174): undefined
> reference to `__sync_sub_and_fetch_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x30d9): undefined
> reference to `__sync_bool_compare_and_swap_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3d1c): undefined
> reference to `__sync_add_and_fetch_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3dcd): undefined
> reference to `__sync_sub_and_fetch_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3f7d): undefined
> reference to `__sync_bool_compare_and_swap_4'
> CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3fbb): undefined
> reference to `__sync_bool_compare_and_swap_4'
> CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x64a):
> undefined reference to `__sync_add_and_fetch_4'
> CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x688):
> undefined reference to `__sync_sub_and_fetch_4'
> CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x6bb):
> undefined reference to `__sync_add_and_fetch_4'
> CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x703):
> undefined reference to `__sync_sub_and_fetch_4'
>
> I get the source from the Git repo and run cmake to create MinGW Makefile,
> after that I run mingw32-make and get the linker error.
> How can I fix the build?
>
> Thanks
>
> Phil
> _______________________________________________
> Openal mailing list
> [email protected]
> http://opensource.creative.com/mailman/listinfo/openal
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[email protected]
http://academic.cleardefinition.com

--047d7b2e0b8d02c9f604da2d7c00
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Those are GCC atomic intrinsics, so it&#39;s a bit strange=
 to see them in a linker error. =A0What version of GCC are you using in min=
gw? (What build of mingw are you using? I&#39;m pretty sure I cross-compile=
 continuously with mxe)<div>
<br></div><div>Ryan</div></div><div class=3D"gmail_extra"><br><br><div clas=
s=3D"gmail_quote">On Thu, Apr 11, 2013 at 6:02 PM, Philipp Kraus <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank=
">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hello,<br>
<br>
I try to build OpenAL under MinGW and get the linker errors:<br>
<br>
Linking C shared library OpenAL32.dll<br>
Creating library file: libOpenAL32.dll.a<br>
CMakeFiles\OpenAL32.dir/objects.a(alError.obj):alError.c:(.text+0x27): unde=
fined =A0reference to `__sync_bool_compare_and_swap_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x24c): undefined r=
eference to `__sync_bool_compare_and_swap_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0xff1): undefined r=
eference to `__sync_bool_compare_and_swap_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x14cd): undefined =
reference to `__sync_bool_compare_and_swap_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x20d8): undefined =
reference to `__sync_add_and_fetch_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x2174): undefined =
reference to `__sync_sub_and_fetch_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x30d9): undefined =
reference to `__sync_bool_compare_and_swap_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3d1c): undefined =
reference to `__sync_add_and_fetch_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3dcd): undefined =
reference to `__sync_sub_and_fetch_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3f7d): undefined =
reference to `__sync_bool_compare_and_swap_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3fbb): undefined =
reference to `__sync_bool_compare_and_swap_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x64a): und=
efined reference to `__sync_add_and_fetch_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x688): und=
efined reference to `__sync_sub_and_fetch_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x6bb): und=
efined reference to `__sync_add_and_fetch_4&#39;<br>
CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x703): und=
efined reference to `__sync_sub_and_fetch_4&#39;<br>
<br>
I get the source from the Git repo and run cmake to create MinGW Makefile, =
after that I run mingw32-make and get the linker error.<br>
How can I fix the build?<br>
<br>
Thanks<br>
<br>
Phil<br>
_______________________________________________<br>
Openal mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]=
e.com</a><br>
<a href=3D"http://opensource.creative.com/mailman/listinfo/openal" target=
=3D"_blank">http://opensource.creative.com/mailman/listinfo/openal</a><br>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>Ryan Pavlik<=
br>HCI Graduate Student<br>Virtual Reality Applications Center<br>Iowa Stat=
e University<br><br><a href=3D"mailto:[email protected]" target=3D"_blank=
">[email protected]</a><br>
<a href=3D"http://academic.cleardefinition.com" target=3D"_blank">http://ac=
ademic.cleardefinition.com</a>
</div>

--047d7b2e0b8d02c9f604da2d7c00--

--===============1790092578==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal

--===============1790092578==--