briefcase icon indicating copy to clipboard operation
briefcase copied to clipboard

Unable to link app during briefcase package

Open johnnydepup opened this issue 5 years ago • 8 comments

Describe the bug I am going through the tutorials. I have created the Hello World app on Windows and verified that it works when I do briefcase dev. Then I went through the next steps to package the application. I ran the briefcase package and I got the following error.

Linking application installer...
light.exe : error LGHT0103 : The system cannot find the file 'src\python\_multiprocessing.pyd' with type ''.

Unable to link app helloworld.

The file src\python\_multiprocessing.pyd exists in the windows\Hello World directory.

The full output is as follows:

[helloworld] Building MSI...

Compiling application manifest...

Compiling application installer...
helloworld.wxs
helloworld-manifest.wxs

Linking application installer...
light.exe : error LGHT0103 : The system cannot find the file 'src\python\_multiprocessing.pyd' with type ''.

Unable to link app helloworld.

To Reproduce Follow the tutorial steps on Windows 10 machine and run briefcase package command.

Expected behavior The installer is supposed to be created.

Environment:

  • Operating System: Windows 10 64 bit
  • Python version: Python 3.8 32 bit
  • Software versions:
    • Briefcase: 0.3.3
    • Toga: Not sure

Please let me know how I can fix this

johnnydepup avatar Nov 10 '20 17:11 johnnydepup

I tried the same with python3.7 on the same machine. Got a similar error.

[test] Building MSI...

Compiling application manifest...

Compiling application installer...
test.wxs
test-manifest.wxs

Linking application installer...
light.exe : error LGHT0103 : The system cannot find the file 'src\python\_queue.pyd' with type ''.

Unable to link app test.

Looks like there definitely is some error here.

johnnydepup avatar Nov 10 '20 18:11 johnnydepup

Is this any solution to this problem: https://github.com/wixtoolset/issues/issues/4364

johnnydepup avatar Nov 10 '20 18:11 johnnydepup

Any solutions to this issue?

johnnydepup avatar Nov 14 '20 20:11 johnnydepup

Can't say I've seen this one before. It might be related to a recent change we made to the Windows packaging template. To rule out the WiX problem that you referenced: are you running Briefcase in a particularly long/deep path?

freakboy3742 avatar Nov 14 '20 22:11 freakboy3742

Not sure what is considered long but the current path does seem a bit long.

The src/python directory under the windows directory has the following path.

C:\Personal\Projects\Python_Projects\beeware_test\timezonebuddy\windows\Timezone Buddy\src\python\

I will try it on a shorter path and will check if that resolves it.

johnnydepup avatar Nov 15 '20 07:11 johnnydepup

So, it was the long paths that was causing the issue. I tried with a couple of different locations and this is what I found:

The whole path for the pyd files should be around 70 characters. Any more than that will case issues.

All of the following paths did not work

C:\Personal\Projects\Python_Projects\beeware_test\timezonebuddy\windows\Timezone Buddy\src\python\_multiprocessing.pyd - 118 Chars - DID NOT WORK
C:\Personal\Projects\Python_Projects\helloworld\windows\Hello World\src\python\winsounds.pyd - 92 Chars- DID NOT WORK
C:\Personal\Projects\helloworld\windows\Hello World\src\python\winsounds.pyd - 76 Chars - DID NOT WORK

This worked

C:\Personal\helloworld\windows\Hello World\src\python\winsounds.pyd - 67 Chars - WORKS

This does not leave a lot of flexibility for directory structure on windows as the packaging path for hello world application already consists of helloworld\windows\Hello World\src\python\winsound.pyd which takes up almost 60 characters!

@freakboy3742, I think we should document this path limitation as part of Windows packaging so that someone else doesn't have to try all of this again.

johnnydepup avatar Nov 15 '20 08:11 johnnydepup

Thanks for that diagnosis - it's very helpful. I'll reopen this as a placeholder reminder that we need to document this (and, if possible, find a workaround).

freakboy3742 avatar Nov 17 '20 22:11 freakboy3742

It's also a briefcase problem; so I'll forward the problem to there.

freakboy3742 avatar Nov 17 '20 22:11 freakboy3742