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

[sjpeg] Add new port #21094

Merged
merged 6 commits into from
Nov 4, 2021
Merged

[sjpeg] Add new port #21094

merged 6 commits into from
Nov 4, 2021

Conversation

chausner
Copy link
Contributor

Describe the pull request

  • What does your PR fix?

    This adds a new port for sjpeg.

  • Which triplets are supported/not supported? Have you updated the CI baseline?

    Not sure yet, Yes

  • Does your PR follow the maintainer guide?

    Yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

    Yes

@NancyLi1013 NancyLi1013 self-assigned this Nov 1, 2021
@dg0yt
Copy link
Contributor

dg0yt commented Nov 1, 2021

What is the problem with windows dynamic?

ATM it installs man1 manual pages (i.e. for tools) but it doesn't install a tool (feature). (They are the "examples".)

@NancyLi1013 NancyLi1013 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Nov 1, 2021
ports/sjpeg/portfile.cmake Outdated Show resolved Hide resolved
ports/sjpeg/vcpkg.json Outdated Show resolved Hide resolved
@chausner
Copy link
Contributor Author

chausner commented Nov 1, 2021

What is the problem with windows dynamic?

ATM it installs man1 manual pages (i.e. for tools) but it doesn't install a tool (feature). (They are the "examples".)

It fails with the following linker error:

[12/13] cmd.exe /C "cd . && D:\vcpkg\downloads\tools\cmake-3.21.1-windows\cmake-3.21.1-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=CMakeFiles\utils.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1430~1.307\bin\Hostx64\x86\link.exe  CMakeFiles\utils.dir\examples\utils.cc.obj  /out:utils.dll /implib:utils.lib /pdb:utils.pdb /dll /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL  D:\vcpkg\installed\x86-windows\debug\lib\libpng16d.lib  D:\vcpkg\installed\x86-windows\debug\lib\zlibd.lib  D:\vcpkg\installed\x86-windows\debug\lib\jpeg.lib  opengl32.lib  D:\vcpkg\installed\x86-windows\debug\lib\freeglutd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
FAILED: utils.dll utils.lib 
cmd.exe /C "cd . && D:\vcpkg\downloads\tools\cmake-3.21.1-windows\cmake-3.21.1-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=CMakeFiles\utils.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1430~1.307\bin\Hostx64\x86\link.exe  CMakeFiles\utils.dir\examples\utils.cc.obj  /out:utils.dll /implib:utils.lib /pdb:utils.pdb /dll /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL  D:\vcpkg\installed\x86-windows\debug\lib\libpng16d.lib  D:\vcpkg\installed\x86-windows\debug\lib\zlibd.lib  D:\vcpkg\installed\x86-windows\debug\lib\jpeg.lib  opengl32.lib  D:\vcpkg\installed\x86-windows\debug\lib\freeglutd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK Pass 1: command "C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1430~1.307\bin\Hostx64\x86\link.exe CMakeFiles\utils.dir\examples\utils.cc.obj /out:utils.dll /implib:utils.lib /pdb:utils.pdb /dll /version:0.0 /machine:X86 /nologo /debug /INCREMENTAL D:\vcpkg\installed\x86-windows\debug\lib\libpng16d.lib D:\vcpkg\installed\x86-windows\debug\lib\zlibd.lib D:\vcpkg\installed\x86-windows\debug\lib\jpeg.lib opengl32.lib D:\vcpkg\installed\x86-windows\debug\lib\freeglutd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\utils.dir/intermediate.manifest CMakeFiles\utils.dir/manifest.res" failed (exit code 1120) with the following output:
utils.cc.obj : error LNK2019: unresolved external symbol "public: void __thiscall sjpeg::EncoderParam::ResetMetadata(void)" (?ResetMetadata@EncoderParam@sjpeg@@QAEXXZ) referenced in function "class std::vector<unsigned char,class std::allocator<unsigned char> > __cdecl ReadJPEG(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int * const,int * const,struct sjpeg::EncoderParam * const)" (?ReadJPEG@@YA?AV?$vector@EV?$allocator@E@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@QAH1QAUEncoderParam@sjpeg@@@Z)

I did not further investigate this error since the library is missing dllexport annotations and a DEF file, so it is obviously not intended to be built as a dynamic library on Windows.

@chausner
Copy link
Contributor Author

chausner commented Nov 1, 2021

ATM it installs man1 manual pages (i.e. for tools) but it doesn't install a tool (feature). (They are the "examples".)

Good catch. I guess they should only get installed if the tools get installed, as well. Or should man pages never get installed?

@NancyLi1013
Copy link
Contributor

Generally, man pages are not installed to vcpkg. If installed by upstream, we can remove the folder. You can see that there are many ports removing the man installation.

For the tool (examples in this port ), we can disable it via pass -DSJPEG_BUILD_EXAMPLES=OFF.

https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#do-not-build-testsdocsexamples-by-default

https://github.com/webmproject/sjpeg/blob/676de227d75877eb5863ec805ba0a4b97fc2fc6c/CMakeLists.txt#L24

@chausner
Copy link
Contributor Author

chausner commented Nov 2, 2021

I pushed a3e6f4a which removes the man pages.

@NancyLi1013 NancyLi1013 added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Nov 3, 2021
@NancyLi1013
Copy link
Contributor

LGTM, thanks for adding this port. @chausner

@dan-shaw dan-shaw merged commit f012fae into microsoft:master Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants