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

Please remove broken cmake code for e2k. #10575

Open
ilyakurdyukov opened this issue Apr 20, 2024 · 3 comments
Open

Please remove broken cmake code for e2k. #10575

ilyakurdyukov opened this issue Apr 20, 2024 · 3 comments

Comments

@ilyakurdyukov
Copy link

Operating System Info

Other

Other OS

AltLinux

OBS Studio Version

30.1.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

none

OBS Studio Crash Log URL

No response

Expected Behavior

cmake should succeed

Current Behavior

if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "e2k")

This code uses a minus sign from the warning option in the variable name, which breaks cmake.

/usr/bin/cc   -pipe -Wall -Wno-error -g -O3 -march=elbrus-v5  -std=gnu17   -DC_COMPILER_SUPPORTS_FLAG_-Wno-unused-parameter -Wno-unused-parameter -o CMakeFiles/cmTC_ff446.dir/src.c.o -c /usr/src/RPM/BUILD/obs-studio-30.1.2/e2kv5-alt-linux/CMakeFiles/CMakeScratch/TryCompile-PVn0pT/src.c
lcc: Warning #1648: '=' assumed following macro name
          "C_COMPILER_SUPPORTS_FLAG_" in command-line definition

And then cmake fail on any compile tests, like this:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Threads (missing: Threads_FOUND)

I didn’t find in the history who added this code for e2k. It's better to delete this code, you won't be able to maintain it. And those distributions that work with this architecture will patch it themselves.

Steps to Reproduce

try to build on e2k machine

Anything else we should know?

Where's the build issues template, did you expect this to never happen?

@Fenrirthviti
Copy link
Member

Support was added by a contributor 4 years ago: #3288

Probably worth just dropping support at this point, but unlikely to be something we fix ourselves as we don't have access to any e2k machines.

Feel free to open a PR to remove the problematic code.

@Lain-B
Copy link
Collaborator

Lain-B commented Apr 20, 2024

@makise-homura Not sure if you're still participating on github all that much, but if you're around it seems that e2k isn't currently compiling.

@ilyakurdyukov It's one thing to say "There's a bug in this code" or "this code is incorrect", and maybe I would have even been fine with "buggy code", but saying "poorly written" is unnecessary wording that goes beyond that, don't you think? It was kind enough that a contributor came around to advocate for and add support for e2k, so I don't see the point of adding unnecessary wording such as "poorly written" other than to be abrasive. Please kindly keep such abrasive and unnecessary wording out of our repository, and keep things constructive as per our conduct guidelines. We try to work together, not against one another.

Anyway, you're saying to remove it, but whether we remove it or not, it's not like anything will change for people who use e2k anyway if it were removed. If it's not currently compiling then it still won't compile anyway. So I'm not sure why you even made this issue report. Probably would have been better to just to ignore it at that point and move on from.

@ilyakurdyukov
Copy link
Author

@makise-homura, please fix this.

This breaks cmake-3.28.3 very badly. I disabled this code and don't see any of the warnings listed, so not only is it broken, but it's no longer needed.

I successfully built the obs-studio using these hacks:

sed -i '/MATCHES "e2k"/c if(false)' cmake/Modules/CompilerConfig.cmake
%add_optflags -DSIMDE_ARCH_AMD64=1000 -mno-sse4.2

The only spam warning in the log:

lcc: "/usr/src/RPM/BUILD/obs-studio-30.1.2/libobs/graphics/../util/simde/x86/sse2.h", line 5427: warning #1675:
          unrecognized GCC pragma [-Wunknown-pragmas]
  	SIMDE_VECTORIZE
  	    ^

This warning appeared 3419 times during the build.

@ilyakurdyukov ilyakurdyukov changed the title Please remove poorly written cmake code for e2k. Please remove broken cmake code for e2k. Apr 20, 2024
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

3 participants