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

Build fails on GCC 10 #5

Open
player-03 opened this issue Oct 28, 2021 · 3 comments
Open

Build fails on GCC 10 #5

player-03 opened this issue Oct 28, 2021 · 3 comments

Comments

@player-03
Copy link

GCC 10 contains a breaking change: it defaults to -fno-common, which requires globals to be declared in exactly one C file, and referenced elsewhere with extern. [...] This could be fixed by declaring globals in exactly one place as noted above, or by explicitly passing -fcommon to gcc.

-Issue description on openal-soft

In Lime, this produces an error message when running lime rubuild:

/usr/bin/ld: obj/linux64/0fd0c071_panning.o:(.rodata+0x13a0): multiple definition of `FuMa2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xea0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_panning.o:(.rodata+0x13e0): multiple definition of `SN3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xee0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_panning.o:(.rodata+0x1420): multiple definition of `N3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xf20): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_ALu.o:(.rodata+0x3bfa0): multiple definition of `FuMa2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xea0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_ALu.o:(.rodata+0x3bfe0): multiple definition of `SN3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xee0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_ALu.o:(.rodata+0x3c020): multiple definition of `N3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xf20): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_bformatdec.o:(.rodata+0x300): multiple definition of `SN3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xee0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_bformatdec.o:(.rodata+0x340): multiple definition of `N3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xf20): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_bformatdec.o:(.rodata+0x2c0): multiple definition of `FuMa2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xea0): first defined here
collect2: error: ld returned 1 exit status

Oddly, passing -fcommon to the linker doesn't work, and that's a backwards solution anyway. Instead, we should use openal-soft's fix, as implemented in 20f5e7c.

player-03 added a commit to player-03/openal that referenced this issue Oct 28, 2021
@player-03
Copy link
Author

Update: you aren't supposed to pass -fcommon to the linker. You need to pass it when compiling the .o files. I've submitted the workaround, but updating is still preferable in the long run.

@ccpplinux
Copy link

Thanks for giving me hint. After adding -fcommon flag when I executed then command lime rebuild linux -64 -release -clean then it executed successfully. However when I executed the command lime rebuild tools then following error messages were displayed:

../src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be Null<lime.utils.ArrayBufferView>
../src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For optional function argument 'view'
../src/lime/_internal/backend/native/NativeWindow.hx:143: characters 5-23 : lime._internal.backend.native.NativeOpenGLRenderContext should be lime.graphics.OpenGLES2RenderContext
../src/lime/_internal/backend/native/NativeWindow.hx:144: characters 5-23 : lime._internal.backend.native.NativeOpenGLRenderContext should be lime.graphics.WebGLRenderContext
../src/lime/_internal/backend/native/NativeWindow.hx:150: characters 6-24 : lime._internal.backend.native.NativeOpenGLRenderContext should be lime.graphics.OpenGLES3RenderContext
../src/lime/_internal/backend/native/NativeWindow.hx:151: characters 6-25 : lime._internal.backend.native.NativeOpenGLRenderContext should be lime.graphics.WebGL2RenderContext
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1810: characters 22-28 : lime.utils.Float32Array should be lime.utils.DataPointer
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1810: characters 22-28 : ... For function argument 'params'
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1815: characters 22-28 : lime.utils.Float32Array should be lime.utils.DataPointer
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1815: characters 22-28 : ... For function argument 'params'
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1831: characters 24-30 : lime.utils.UInt32Array should be lime.utils.DataPointer
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1831: characters 24-30 : ... For function argument 'params'
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1836: characters 24-30 : lime.utils.Int32Array should be lime.utils.DataPointer
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1836: characters 24-30 : ... For function argument 'params'
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1841: characters 24-30 : lime.utils.Int32Array should be lime.utils.DataPointer
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:1841: characters 24-30 : ... For function argument 'params'
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:2313: characters 36-42 : lime.utils.Int32Array should be lime.utils.DataPointer
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:2313: characters 36-42 : ... For function argument 'params'
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:2319: characters 36-42 : lime.utils.Float32Array should be lime.utils.DataPointer
../src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx:2319: characters 36-42 : ... For function argument 'params'
../src/lime/graphics/WebGL2RenderContext.hx:4617: characters 63-64 : lime.utils.Float32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4617: characters 63-64 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4631: characters 64-65 : lime.utils.Int32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4631: characters 64-65 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4639: characters 66-67 : lime.utils.UInt32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4639: characters 66-67 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4655: characters 70-71 : lime.utils.Float32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4655: characters 70-71 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4669: characters 71-72 : lime.utils.Int32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4669: characters 71-72 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4678: characters 73-74 : lime.utils.UInt32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4678: characters 73-74 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4696: characters 80-81 : lime.utils.Float32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4696: characters 80-81 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4712: characters 81-82 : lime.utils.Int32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4712: characters 81-82 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4721: characters 83-84 : lime.utils.UInt32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4721: characters 83-84 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4740: characters 74-75 : lime.utils.Float32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4740: characters 74-75 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4757: characters 75-76 : lime.utils.Int32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4757: characters 75-76 : ... For function argument 'v'
../src/lime/graphics/WebGL2RenderContext.hx:4767: characters 77-78 : lime.utils.UInt32Array should be lime.utils.DataPointer
../src/lime/graphics/WebGL2RenderContext.hx:4767: characters 77-78 : ... For function argument 'v'
../src/lime/media/openal/AL.hx:1307: characters 3-11 : Int should be lime.media.openal.ALBuffer
../src/lime/media/OpenALAudioContext.hx:573: characters 3-40 : lime.media.openal.ALBuffer should be Int
platforms/AndroidPlatform.hx:500: characters 19-51 : You can't iterate on a Dynamic value, please specify Iterator or Iterable

Can you please specify a solution for it?

@player-03
Copy link
Author

player-03 commented Dec 9, 2021

Turns out the workaround was accepted on November 13 (see 9b3a80d). Closing this, but we can continue the discussion in openfl/lime#1493.

Edit: actually no, the opening post still describes a problem that needs solving. Let's leave it open.

@player-03 player-03 reopened this Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants