Re: linker error on MinGW build

Philipp Kraus <[email protected]> Fri, 12 Apr 2013 20:05:20 +0200
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
--===============1384222936==
Content-Type: multipart/alternative; boundary=Apple-Mail-9-935663710


--Apple-Mail-9-935663710
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

I use gcc 4.7.1, I'm testing the mach flag :-)

Phil


Am 12.04.2013 um 19:46 schrieb Ryan Pavlik:

> 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)
>=20
> Ryan
>=20
>=20
> On Thu, Apr 11, 2013 at 6:02 PM, Philipp Kraus =
<[email protected]> wrote:
> Hello,
>=20
> I try to build OpenAL under MinGW and get the linker errors:
>=20
> 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'
>=20
> 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?
>=20
> Thanks
>=20
> Phil
> _______________________________________________
> Openal mailing list
> [email protected]
> http://opensource.creative.com/mailman/listinfo/openal
>=20
>=20
>=20
> --=20
> Ryan Pavlik
> HCI Graduate Student
> Virtual Reality Applications Center
> Iowa State University
>=20
> [email protected]
> http://academic.cleardefinition.com


--Apple-Mail-9-935663710
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>I use gcc 4.7.1, I'm testing the mach flag :-)</div><div><br></div><div>Phil</div></div><div><br></div><br><div><div>Am 12.04.2013 um 19:46 schrieb Ryan Pavlik:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Those are GCC atomic intrinsics, so it's a bit strange to see them in a linker error. &nbsp;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)<div>
<br></div><div>Ryan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 6:02 PM, Philipp Kraus <span dir="ltr">&lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #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): undefined &nbsp;reference to `__sync_bool_compare_and_swap_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x24c): undefined reference to `__sync_bool_compare_and_swap_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0xff1): undefined reference to `__sync_bool_compare_and_swap_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x14cd): undefined reference to `__sync_bool_compare_and_swap_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x20d8): undefined reference to `__sync_add_and_fetch_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x2174): undefined reference to `__sync_sub_and_fetch_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x30d9): undefined reference to `__sync_bool_compare_and_swap_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3d1c): undefined reference to `__sync_add_and_fetch_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3dcd): undefined reference to `__sync_sub_and_fetch_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3f7d): undefined reference to `__sync_bool_compare_and_swap_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(ALc.obj):ALc.c:(.text+0x3fbb): undefined reference to `__sync_bool_compare_and_swap_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x64a): undefined reference to `__sync_add_and_fetch_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x688): undefined reference to `__sync_sub_and_fetch_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x6bb): undefined reference to `__sync_add_and_fetch_4'<br>
CMakeFiles\OpenAL32.dir/objects.a(helpers.obj):helpers.c:(.text+0x703): undefined reference to `__sync_sub_and_fetch_4'<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="mailto:[email protected]">[email protected]</a><br>
<a href="http://opensource.creative.com/mailman/listinfo/openal" target="_blank">http://opensource.creative.com/mailman/listinfo/openal</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Ryan Pavlik<br>HCI Graduate Student<br>Virtual Reality Applications Center<br>Iowa State University<br><br><a href="mailto:[email protected]" target="_blank">[email protected]</a><br>
<a href="http://academic.cleardefinition.com/" target="_blank">http://academic.cleardefinition.com</a>
</div>
</blockquote></div><br></body></html>
--Apple-Mail-9-935663710--

--===============1384222936==
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

--===============1384222936==--