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

lensfun 0.3.95 is broken #7108

Closed
phrrk opened this issue Oct 11, 2020 · 20 comments
Closed

lensfun 0.3.95 is broken #7108

phrrk opened this issue Oct 11, 2020 · 20 comments
Labels

Comments

@phrrk
Copy link

phrrk commented Oct 11, 2020

Version 0.3.95 of lensfun was only an alpha release and was soon shown to be seriously broken. The relevant changes have been made in the git master for lensfun, but there have been no new releases. As can be seen in
https://repology.org/project/lensfun/packages very few distributions offer this version and instead offer the earlier stable version 0.3.2. This package is extensively used in raw photo development applications like darktable and they have got around this problem by reverting to 0.3.2, which used to be available from http://repo.msys2.org/mingw/x86_64/ This old package has now been removed and so there is a problem for anyone starting with a clean MSYS2 installation. Is it possible to have the old 0.3.2 package reinstated into the repository? Although a better solution might be to replace the current 0.3.95 package with this older one as the current current package is of no use to anyone.

@sfhacker
Copy link

We are not familiar with lensfun project!
We have just built versions 0.3.2 & 0.3.95 from source on Windows 10 x64 with no issues at all.

image

Let us know if you require further assistance.

@lazka
Copy link
Member

lazka commented Oct 12, 2020

@phrrk Would updating to current git master also be an option?

@phrrk
Copy link
Author

phrrk commented Oct 12, 2020

@lazka as far as I can see there is little lensfun development going on at the moment and I have no idea what the current status is. Existing applications that use lensfun, e.g. darktable and RawTherapee all use version 0.3.2 which is the version offered by major linux distributions and macOS. Significant changes were made to the way lensfun works since the 0.3.2 so it is not clear the the git master version is compatible with the applications that use it. Therefore making the 0.3.2 package available again is really essential.

@phrrk
Copy link
Author

phrrk commented Oct 12, 2020

@sfhacker #6525 describes the issue. It is lensfun 0.3.95 itself that is broken (it was only an alpha release) not specifically the mingw package. This is why linux distributions offer 0.3.2 as the latest version.

@Alexpux
Copy link
Member

Alexpux commented Oct 12, 2020

@lazka @elieux lets revert lensfun to 0.3.2

@lazka
Copy link
Member

lazka commented Oct 12, 2020

Sounds good to me. Here are the lensfun-0.3.2-4 packages from my backup:

lensfun-0.3.2-4.zip

@kmilos
Copy link
Contributor

kmilos commented Oct 15, 2020

Latest lensfun-0.3.2-5 doesn't seem to ship the necessary python modules...

@lazka
Copy link
Member

lazka commented Oct 15, 2020

Some quick test show that DESTDIR here is empty, but shouldn't be:

+ INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${SETUP_PY_INSTALL_PREFIX} --root=${DESTDIR})")

Anyone know why that is?

@phrrk
Copy link
Author

phrrk commented Oct 16, 2020

Ok I have tried to build the package locally (my first attempt at building an MSYS2 package so I cannot provide much insight). I can confirm that the package I built also has none of the python modules included. However the log file seems to suggest that they are there as shown in the snippet from the end of it below:

running install
running build
running build_py
creating build
creating build/lib
creating build/lib/lensfun
copying C:/msys64/home/jim/mingw-w64-lensfun/src/build-x86_64-w64-mingw32/apps/lensfun/init.py -> build/lib/lensfun
running install_lib
creating mingw64
creating mingw64/lib
creating mingw64/lib/python3.8
creating mingw64/lib/python3.8/site-packages
creating mingw64/lib/python3.8/site-packages/lensfun
copying build/lib/lensfun/init.py -> mingw64/lib/python3.8/site-packages/lensfun
byte-compiling mingw64/lib/python3.8/site-packages/lensfun/init.py to init.cpython-38.pyc
running install_egg_info
Writing mingw64/lib/python3.8/site-packages/lensfun-0.3.2-py3.8.egg-info

However looking in ......./pkg/mingw-w64-x86_64-lensfun/mingw64/lib, which I believe is where the python3.8 directory should be, it is not to be found. Instead I found it below the .../src directory

jim@Jim-PC MINGW64 ~/mingw-w64-lensfun/src/build-x86_64-w64-mingw32/mingw64/lib/python3.8/site-packages
$ ls
lensfun lensfun-0.3.2-py3.8.egg-info

As I said this is my first attempt at a package build so I could be totally off track, but it looks to me like the python files are written to the wrong place and hence do not get included in the package when it is created. Checking on the old copy of lensfun-0.3.2-4 the files are dated 04/09/2017. One change since then is that python has gone from 3.6 to 3.8 and maybe there have been other relevant changes.

@phrrk
Copy link
Author

phrrk commented Oct 16, 2020

Further to my comments above I have made some progress. Changing the last but one line of cmake-mingw.patch to

+ INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")

solves the problem of getting the python files installed in the correct place and included in the package file. The only possible issue is that there are 2 packaging warnings

==> Checking for packaging issues...
==> WARNING: Package contains reference to $srcdir
mingw64/bin/liblensfun.dll
==> WARNING: Package contains reference to $pkgdir
mingw64/lib/python3.8/site-packages/lensfun/__pycache__/__init__.cpython-38.pyc
==> Creating package "mingw-w64-x86_64-lensfun"...

I don't know whether these warnings are significant, but the first of them was there anyway before my edit and the second would not have been because the python stuff was not in the package anyway.

@lazka
Copy link
Member

lazka commented Oct 16, 2020

Does INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${SETUP_PY_INSTALL_PREFIX} --root=\$ENV{DESTDIR})") also work maybe?

@phrrk
Copy link
Author

phrrk commented Oct 16, 2020

Yes that seems to work too and now I only get the one warning message

==> Checking for packaging issues...
==> WARNING: Package contains reference to $srcdir
mingw64/bin/liblensfun.dll

@kmilos
Copy link
Contributor

kmilos commented Oct 16, 2020

FWIW, I'm seeing the same warning on another package, the path of the source directory indeed ends up somehow in binary objects (both shared and static) as plain text...

@Biswa96
Copy link
Member

Biswa96 commented Oct 16, 2020

That sometimes happen if __FILE__ is used in a specific (maybe wrong) way in source code. Try to grep recursively the pkg folder after creating the package. If the source directory path is not used in actual functions then the warning may be safely ignored.

@phrrk
Copy link
Author

phrrk commented Oct 16, 2020

Having found the reference to $srcdir in the offending dll it just appears amongst some other text which looks like error messages. I doubt very much that functionality is affected.

@kmilos
Copy link
Contributor

kmilos commented Oct 16, 2020

Same here, they all seem to be XMP_Enforce failed errors in my case...

lazka added a commit to lazka/MINGW-packages that referenced this issue Oct 17, 2020
@lazka
Copy link
Member

lazka commented Oct 17, 2020

Thanks, see #7128

@lazka
Copy link
Member

lazka commented Oct 20, 2020

This should be fixed now. Can anyone confirm?

@lazka lazka added the needinfo label Oct 20, 2020
@kmilos
Copy link
Contributor

kmilos commented Oct 20, 2020

Python module is indeed now there and I could execute lensfun-update-data, but I'll leave it to the OP to close the issue.

@phrrk
Copy link
Author

phrrk commented Oct 20, 2020

Yes works for me thanks. Sorry forgot to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants