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

[WIP] gmic_krita_qt: 2.3.6 -> 2.6.4 #62270

Closed
wants to merge 2 commits into from
Closed

Conversation

d3rped
Copy link
Contributor

@d3rped d3rped commented May 31, 2019

Motivation for this change

Update Krita's gmic "plugin"

Things done

Update version number and checksums.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Things to do
  • gmic_krita_qt fails to link against fftw.
    If anyone has some time I would be happy about a few hints.

Relevant Information:

Error Message:

/nix/store/2dfjlvp38xzkyylwpavnh61azi0d168b-binutils-2.31.1/bin/ld: CMakeFiles/gmic_krita_qt.dir/build/gmic/src/gmic.cpp.o: in function `_GLOBAL__sub_I_gmic.cpp':
gmic.cpp:(.text.startup+0x2): undefined reference to `fftw_init_threads'
/nix/store/2dfjlvp38xzkyylwpavnh61azi0d168b-binutils-2.31.1/bin/ld: CMakeFiles/gmic_krita_qt.dir/src/FilterSelector/FiltersModelReader.cpp.o: in function `_GLOBAL__sub_I_FiltersModelReader.cpp':
FiltersModelReader.cpp:(.text.startup+0x2f): undefined reference to `fftw_init_threads'
/nix/store/2dfjlvp38xzkyylwpavnh61azi0d168b-binutils-2.31.1/bin/ld: CMakeFiles/gmic_krita_qt.dir/src/CroppedImageListProxy.cpp.o: in function `_GLOBAL__sub_I_CroppedImageListProxy.cpp':
CroppedImageListProxy.cpp:(.text.startup+0x2b): undefined reference to `fftw_init_threads'
/nix/store/2dfjlvp38xzkyylwpavnh61azi0d168b-binutils-2.31.1/bin/ld: CMakeFiles/gmic_krita_qt.dir/src/CroppedActiveLayerProxy.cpp.o: in function `_GLOBAL__sub_I_CroppedActiveLayerProxy.cpp':
CroppedActiveLayerProxy.cpp:(.text.startup+0x2b): undefined reference to `fftw_init_threads'
/nix/store/2dfjlvp38xzkyylwpavnh61azi0d168b-binutils-2.31.1/bin/ld: CMakeFiles/gmic_krita_qt.dir/src/FilterSyncRunner.cpp.o: in function `_GLOBAL__sub_I_FilterSyncRunner.cpp':
FilterSyncRunner.cpp:(.text.startup+0x2f): undefined reference to `fftw_init_threads'
/nix/store/2dfjlvp38xzkyylwpavnh61azi0d168b-binutils-2.31.1/bin/ld: CMakeFiles/gmic_krita_qt.dir/src/FilterThread.cpp.o:FilterThread.cpp:(.text.startup+0x2f): more undefined references to `fftw_init_threads' follow
collect2: error: ld returned 1 exit status

This is quite weird as the previous version was also linked against this library as well.
CMakeLists.txt file diff:

  message(FATAL_ERROR "\nVersion numbers of files 'gmic.h' (" |	  message(FATAL_ERROR "\nVersion numbers of files 'gmic.h' ("
    add_definitions(-Dgmic_prelease=${PRERELEASE_DATE})	      |	    add_definitions(-Dgmic_prerelease="${PRERELEASE_DATE}")
add_definitions(-Dcimg_use_rng)				      <
							      >	SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
							      >	SET(CMAKE_INSTALL_RPATH "$ORIGIN/")
							      >
							      >	    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s"
							      >	    if (WIN32)
							      >	        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}
							      >	    endif()
# qt5_create_translation(				      |	set(gmic_translation_files
#     qmic_qt_QM					      <
#     ${CMAKE_SOURCE_DIR}/translations			      <
#     ${gmic_qt_SRCS}					      <
#     translations/cs.ts				      <
#     translations/de.ts				      <
#     translations/es.ts				      <
#     translations/fr.ts				      <
#     translations/id.ts				      <
#     translations/it.ts				      <
#     translations/nl.ts				      <
#     translations/pl.ts				      <
#     translations/pt.ts				      <
#     translations/ru.ts				      <
#     translations/ua.ts				      <
#     translations/ja.ts				      <
#     translations/zh.ts				      <
# )							      <
qt5_add_translation(gmic_qt_QM				      <
							      >	)
							      >
							      >	set_source_files_properties(${gmic_translation_files} PROPERT
							      >
							      >	# qt5_create_translation(
							      >	#     qmic_qt_QM
							      >	#     ${CMAKE_SOURCE_DIR}/translations
							      >	#     ${gmic_qt_SRCS}
							      >	#     ${gmic_translation_files}
							      >	# )
							      >
							      >	qt5_add_translation(gmic_qt_QM
							      >	    ${gmic_translation_files}
							      >	    install(TARGETS gmic_gimp_qt RUNTIME DESTINATION bin)
							      >	    install(TARGETS gmic_krita_qt RUNTIME DESTINATION bin)
							      >	    install(TARGETS gmic_qt RUNTIME DESTINATION bin)
							      >
							      >	elseif (${GMIC_QT_HOST} STREQUAL "paintdotnet")
							      >
							      >	    set (gmic_qt_SRCS ${gmic_qt_SRCS} src/Host/PaintDotNet/ho
							      >	    add_definitions(-DGMIC_HOST=paintdotnet)
							      >	    add_executable(gmic_paintdotnet_qt ${gmic_qt_SRCS} ${gmic
							      >	    target_link_libraries(
							      >	      gmic_paintdotnet_qt
							      >	      PRIVATE
							      >	      ${gmic_qt_LIBRARIES}
							      >	      )
    message(FATAL_ERROR "GMIC_QT_HOST is not defined as gimp, |	    message(FATAL_ERROR "GMIC_QT_HOST is not defined as gimp,

The following two issues also apply to the previous version (so it's unlikely that they are relevant)
FFTW3 is found but there is no path or version number?

-- Found ZLIB: /nix/store/ynykygggqw7l6wy5cp45565c0phxh8kv-zlib-1.2.11/lib/libz.so (found version "1.2.11")
-- Found PNG: /nix/store/phv46yv3c6jraiv2aq6i1dgs9pjr3l8q-libpng-apng-1.6.37/lib/libpng.so (found version "1.6.37")
-- Found PkgConfig: /nix/store/cnxbsf7l63nzy1bssrllxc39lm9wys28-pkg-config-0.29.2/bin/pkg-config (found version "0.29.2")
-- Found FFTW3
-- FFTW Found Version:
-- Found CURL: /nix/store/kzrl9md38ms37pay33kdi97rpcb099v1-curl-7.64.1/lib/libcurl.so (found version "7.64.1")
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")

Also fftw has the required libraries in it's lib folder and fftw.dev has the required header files.

@luzpaz
Copy link
Contributor

luzpaz commented Aug 12, 2019

@d3rped Would you mind updating the regular gmic package (from 2.2.2 to 2.6.7) as well ?

@d3rped
Copy link
Contributor Author

d3rped commented Aug 16, 2019

Sorry for playing dead for the last few months.
I currently do not use krita/gmic actively.
Nonetheless I wanted to at least get this PR done. The issue is; I'm still not sure why it fails.
My best guess, (and it is not a very good one,) is that we are currently building fftw with make (cmake is optional) -> the file FFTW3LibraryDepends.cmake is missing from fftw.dev (it is an include of the fftw cmake file).

$ cmake --find-package -DNAME=FFTW3 -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=EXIST
CMake Error at /nix/store/lzyz0342shlgingwp9b5hnagljydfxa8-fftw-double-3.3.8-dev/lib/cmake/fftw3/FFTW3Config.cmake:13 (include):
  include could not find load file:

    /nix/store/lzyz0342shlgingwp9b5hnagljydfxa8-fftw-double-3.3.8-dev/lib/cmake/fftw3/FFTW3LibraryDepends.cmake
Call Stack (most recent call first):
  /nix/store/i5s8firmgld1wc8b9fsbq8kivwv51lw2-cmake-3.14.5/share/cmake-3.14/Modules/CMakeFindPackageMode.cmake:183 (find_package)

That is just wild speculation though (and it still does not explain why it did work with an earlier version). I'm completely stumped, as previously stated, if somebody knows their way around cmake I'd be happy about pointers/possible solutions.

@luzpaz I'd imagine the regular gmic package will have similar issues (haven't tried it though).

@jtojnar
Copy link
Contributor

jtojnar commented Oct 31, 2019

Fixed in #68257

@jtojnar jtojnar closed this Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants