Skip to content

Up libzip requirement to 1.x for Unicode support#1356

Merged
vadi2 merged 4 commits intodevelopmentfrom
up-libzip-req
Oct 27, 2017
Merged

Up libzip requirement to 1.x for Unicode support#1356
vadi2 merged 4 commits intodevelopmentfrom
up-libzip-req

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Oct 25, 2017

Brief overview of PR changes/additions

Added a random PPA I found that has a newer libzip. I'm not certain if it has the development headers, however.

Motivation for adding to Mudlet

We need the ZIP_FL_ENC_UTF_8 flag to support encoding i18n names for 4.0.

Other info (issues closed, discussion etc)

Addresses issues @SlySven's been running into here and here.

We need the ZIP_FL_ENC_UTF_8 flag to support encoding i18n names for 4.0.
@vadi2 vadi2 requested a review from a team October 25, 2017 05:15
It actually is still called libzip-dev in that PPA:

Built packages
    libzip-dev library for reading, creating, and modifying zip archives (development)
    libzip4 library for reading, creating, and modifying zip archives (runtime)
    zipcmp compare contents of zip archives
    zipmerge merge zip archives
    ziptool modify zip archives
@SlySven
Copy link
Copy Markdown
Member

SlySven commented Oct 25, 2017

It seems that in fact 0.11 is sufficient to address this issue - however the Travis Linux C.I. comes with 0.10 which isn't enough...

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Oct 25, 2017

I thought you said it is 1.x that has the ZIP_FL_ENC_UTF_8 flag?

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Oct 25, 2017

I have successfully just built the 1.30 version of libzip with AppVeyor but I spotted an issue on line 14 of ./CI/appveyor.after_success.ps1 where it says:

COPY $Env:MINGW_BASE_DIR\bin\libzip-2.dll .

and the build log on that CI system reports - WITHOUT IT BEING AN ERROR:

COPY : Cannot find path 'C:\Qt\Tools\mingw492_32\bin\libzip-2.dll' because it
does not exist.
At C:\projects\mudlet\CI\appveyor.after_success.ps1:14 char:3
+ COPY $Env:MINGW_BASE_DIR\bin\libzip-2.dll .
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Qt\Tools\mingw492_32\bin\libzip-2.dll:String) [Copy-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemtemCommand

Any ideas whether this is an issue?

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Oct 25, 2017

I thought you said it is 1.x that has the ZIP_FL_ENC_UTF_8 flag?

It does - it is present in 0.11 and later...

@keneanung
Copy link
Copy Markdown
Member

I'm in the process of making the installation of dependencies more error aware. This will become an error in the future.

It's probably an issue at runtime, if there is no compatible dll found on the user's system, as the dll is probably not part of the binary distribution now.

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Oct 25, 2017

I note that in some circles the old libzip version (what I call 0.1x) are sometimes packaged as libzip2 where as the current ones (1.30-ish) is libzip4. Perhaps it will be good enough to change that line to either:

COPY $Env:MINGW_BASE_DIR\bin\libzip.dll .

or

COPY $Env:MINGW_BASE_DIR\bin\libzip-4.dll .

@keneanung
Copy link
Copy Markdown
Member

@vadi2 while you upgraded travis (linux specifically), but Windows is still at 0.11.x. I am not yet sure what is installed on macOS.

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Oct 25, 2017

Yeah, @SlySven did the Windows upgrade in the #1355 PR 😞

macOS uses 1.3.0: -I/usr/local/Cellar/libzip/1.3.0/include

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Oct 25, 2017

Ah, with regard to:

I see that in the /lib/CMakeLists.txt file in the libzip tarball the following was changed immediately before the 0.10 version was released where a couple of numbers from 2.0 and 2 to 3.0 and 3

SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 3.0 SOVERSION 3 )

I will tweak our /CI/appveyor.after_success.ps1 to also change the 2 to 3 so we have:

COPY $Env:MINGW_BASE_DIR\bin\libzip-3.dll .

and see whether the AppVeyor CI build still has the same error message...

Um, got the PR wrong - I mean I will try this on # 1355...

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Oct 26, 2017

🎆 OK to get the Windows build correct, after changing the following in CI/appveyor.install.ps1 to use a current version (1.30) of libzip from the creators from:

 function InstallLibzip() {
   DownloadFile "https://launchpad.net/ubuntu/+archive/primary/+files/libzip_0.11.2.orig.tar.gz" "libzip_0.11.2.orig.tar.gz"
   ExtractTar "libzip_0.11.2.orig.tar.gz" "libzip"
   Set-Location libzip\libzip-0.11.2
   RunConfigure
   RunMake
   RunMakeInstall
   COPY lib\zipconf.h $Env:MINGW_BASE_DIR\include >> "$logFile" 2>&1
 }

to:

 function InstallLibzip() {
   DownloadFile "https://libzip.org/download/libzip-1.3.0.tar.gz" "libzip-1.3.0.tar.gz"
   ExtractTar "libzip-1.3.0.tar.gz" "libzip"
   Set-Location libzip\libzip-1.3.0
   RunConfigure
   RunMake
   RunMakeInstall
   COPY lib\zipconf.h $Env:MINGW_BASE_DIR\include >> "$logFile" 2>&1
 }

we need the line in /CI/appveyor.after_success.ps1 to change from:

COPY $Env:MINGW_BASE_DIR\bin\libzip-2.dll .

to:

COPY $Env:MINGW_BASE_DIR\bin\libzip-5.dll .

Yee ha!

@keneanung
Copy link
Copy Markdown
Member

@vadi2 can you add the changes @SlySven mentioned above to this PR? There are 2 main reasons for it:

  1. All libzip changes are in one PR
  2. This PR will probably go in pretty quick, which means I can merge it into my Automate Windows SDK setup #1331 and adapt it to some changes. Otherwise, @SlySven has to do the work of merging the changes (I hope I get the SDK setup in quickly) and I don't want to thrust PowerShell merges onto him.

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Oct 27, 2017

All done

Copy link
Copy Markdown
Member

@keneanung keneanung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to both of you!

@vadi2 vadi2 merged commit 3e83c5f into development Oct 27, 2017
@vadi2 vadi2 deleted the up-libzip-req branch October 27, 2017 09:10
@vadi2 vadi2 added this to the 3.6.0 milestone Nov 29, 2017
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

Successfully merging this pull request may close these issues.

3 participants