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

Library names conflict with SVT-VP9 #212

Closed
ihalip opened this issue Jun 11, 2019 · 7 comments
Closed

Library names conflict with SVT-VP9 #212

ihalip opened this issue Jun 11, 2019 · 7 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@ihalip
Copy link

ihalip commented Jun 11, 2019

I'm attempting to create a project using both SVT-HEVC and SVT-VP9 by building them in place, but each of them includes a set of libraries with the same name: C_DEFAULT, ASM_AVX2, etc.

Here's a sample CMake error message (there are more of them, for each of the duplicate names):

CMake Error at SVT-VP9/Source/Lib/C_DEFAULT/CMakeLists.txt:25 (add_library):
  add_library cannot create target "C_DEFAULT" because another target with
  the same name already exists.  The existing target is a static library
  created in source directory
  "/home/ihalip/Projects/repro/SVT-HEVC/Source/Lib/C_DEFAULT".  See
  documentation for policy CMP0002 for more details.

To reproduce: https://gist.github.com/ihalip/6a3668929b061aa32fa5feb9ffcb8778

An obvious fix would be to change the library names in their respective projects, because AFAICT there are large differences between these libraries in each project.

For consistency, I would suggest these libraries be renamed according to the project they are a part of, e.g. HEVC_C_DEFAULT and VP9_C_DEFAULT.

@ihalip
Copy link
Author

ihalip commented Jun 11, 2019

BTW, AVT-AV1 prefixes the names of these libs with COMMON_, so it has e.g. COMMON_C_DEFAULT. IMO, these should also be changed for consistency.

@ihalip
Copy link
Author

ihalip commented Jun 11, 2019

Here's a tentative change for all 3 projects: https://gist.github.com/ihalip/57e6fd4548e66501bde247ee6c3a146e

This introduces a SVT_COMMON_LIBRARY_PREFIX variable (set to either AV1_, HEVC_, VP9_), and the names of the common libraries are prefixed with this value. Here's a list of generated targets:

$ make help | grep -E "(ASM|DEFAULT)"
... AV1_C_DEFAULT
... AV1_ASM_SSE2
... AV1_ASM_SSSE3
... AV1_ASM_SSE4_1
... AV1_ASM_AVX2
... HEVC_C_DEFAULT
... HEVC_ASM_SSE2
... HEVC_ASM_SSSE3
... HEVC_ASM_SSE4_1
... HEVC_ASM_AVX2
... VP9_C_DEFAULT
... VP9_ASM_SSE2
... VP9_ASM_SSSE3
... VP9_ASM_SSE4_1
... VP9_ASM_AVX2

@1480c1
Copy link
Member

1480c1 commented Jun 11, 2019

The av1 ones are now unecessary since they do not generated the individual libraries anymore, the hevc one will soon also be unnecessary with #206 since that will also implement the same changes

@1480c1
Copy link
Member

1480c1 commented Jun 11, 2019

Actually, looking at it, you are trying to create a giant cmake project folder, that is not recommended nor supported since there is still no guarantee on compatibility between the svt encoders except in ffmpeg and existability on the system

@1480c1
Copy link
Member

1480c1 commented Jun 11, 2019

If you really believe that this should be a feature, then please submit a pr or add to a pr that is already modifying the cmakelists and discuss why this should be done instead of making an issue

@ihalip
Copy link
Author

ihalip commented Jun 12, 2019

Actually, looking at it, you are trying to create a giant cmake project folder

Yes. A new CMake project that builds SVT-* encoders as subprojects.

that is not recommended nor supported since there is still no guarantee on compatibility between the svt encoders except in ffmpeg and existability on the system

I don't understand what you're referring to by "compatibility between the svt encoders". They don't need to be compatible. All I'm trying to do is build them all in one go.
And what do you mean by "existability"?

@1480c1
Copy link
Member

1480c1 commented Jun 12, 2019

What I mean by compatibility is essentially building within one giant folder without conflict issues

By existability, I just mean the ability to build separate and install separately on the same machine

@tianjunwork tianjunwork self-assigned this Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants