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

nmake install fail with copy file error #2034

Closed
davidshen84 opened this issue Dec 7, 2016 · 21 comments

Comments

Projects
None yet
8 participants
@davidshen84
Copy link

commented Dec 7, 2016

  • Windows 10 64bit
  • This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-msys-thread-multi

I did:

  • perl Configure --with-zlib-include=D:\zlib128-dll\include --with-zlib-lib=D:\zlib128-dll\lib\zdll.lib no-asm no-shared no-stdio zlib no-zlib-dynamic VC-WIN64A
  • nmake

No error message...not explicit success message either.

  • nmake install
Copying: ./include/openssl/x509_vfy.h to C:/Program Files (x86)/OpenSSL/include/openssl/x509_vfy.h
Copying: ./include/openssl/x509v3.h to C:/Program Files (x86)/OpenSSL/include/openssl/x509v3.h
Need at least two filenames at .\util\copy.pl line 39.
NMAKE : fatal error U1077: '"C:\Program Files\Git\usr\bin\perl.EXE"' : return code '0xff'
Stop.
@levitte

This comment has been minimized.

Copy link
Member

commented Dec 7, 2016

No error message...not explicit success message either.

This is normal behavior.

  • nmake install
Copying: ./include/openssl/x509_vfy.h to C:/Program Files (x86)/OpenSSL/include/openssl/x509_vfy.h
Copying: ./include/openssl/x509v3.h to C:/Program Files (x86)/OpenSSL/include/openssl/x509v3.h
Need at least two filenames at .\util\copy.pl line 39.
NMAKE : fatal error U1077: '"C:\Program Files\Git\usr\bin\perl.EXE"' : return code '0xff'
Stop.

This, on the other hand, is not. Just as a guess, could you please look up the line in makefile that starts with INSTALL_LIBS= and show it to us?

@davidshen84

This comment has been minimized.

Copy link
Author

commented Dec 7, 2016

INSTALL_LIBS=libcrypto.lib libssl.lib

And these two files do exist at the project root. I think it confirms that the build succeeded.

@levitte

This comment has been minimized.

Copy link
Member

commented Dec 7, 2016

Ok. Next guess up, the line that starts with BLDDIR=

@davidshen84

This comment has been minimized.

Copy link
Author

commented Dec 7, 2016

PLATFORM=VC-WIN64A
SRCDIR=.
BLDDIR=.

At the very beginning of the file.

@mattcaswell

This comment has been minimized.

Copy link
Member

commented Dec 7, 2016

I note that you are using msys perl but doing a VC-WIN64A build. That isn't actually a supported combination. See:

https://github.com/openssl/openssl/blob/master/NOTES.PERL#L30

Notes on Perl on Windows

There are a number of build targets that can be viewed as "Windows".
Indeed, there are VC-* configs targeting VisualStudio C, as well as
MinGW and Cygwin. The key recommendation is to use "matching" Perl,
one that matches build environment. For example, if you will build
on Cygwin be sure to use the Cygwin package manager to install Perl.
For MSYS builds use the MSYS provided Perl. For VC-* builds we
recommend ActiveState Perl, available from
http://www.activestate.com/ActivePerl.

@davidshen84

This comment has been minimized.

Copy link
Author

commented Dec 7, 2016

More detail about my environment:

  • Windows 10 64 bit
  • Git for Windows, with shell tool globally available
  • No ActiveState Perl

I want to build openssl in x86_64 configuration. Which target should I choose?

@levitte

This comment has been minimized.

Copy link
Member

commented Dec 7, 2016

No ActiveState Perl

@mattcaswell is right, you will need to install it.

I want to build openssl in x86_64 configuration. Which target should I choose?

VC-WIN64A

@davidshen84

This comment has been minimized.

Copy link
Author

commented Dec 7, 2016

Update

I install ActiveState Perl 64bit, and redo everything.

perl -v

This is perl 5, version 24, subversion 0 (v5.24.0) built for MSWin32-x64-multi-thread
(with 1 registered patch, see perl -V for more detail)

I still got the copy file error, but in a different place. And this is the new error:

created directory `C:/Program Files/OpenSSL/lib'
Copying: libcrypto.lib to C:/Program Files/OpenSSL/lib/libcrypto.lib
Copying: libssl.lib to C:/Program Files/OpenSSL/lib/libssl.lib
Copying: ossl_static.pdb to C:/Program Files/OpenSSL/lib/ossl_static.pdb
ACKNOWLEDGEMENTS AUTHORS CHANGES CONTRIBUTING Configurations Configure FAQ INSTALL LICENSE Makefile.shared NEWS NOTES.DJGPP NOTES.PERL NOTES.VMS NOTES.WIN NUL README README.ECC README.ENGINE README.FIPS VMS app.pdb apps appveyor.yml boringssl build.info config config.com configdata.pm crypto demos doc e_os.h engines external fuzz include libcrypto.lib libssl.lib makefile ms os-dep ossl_static.pdb ssl test tools util Installing engines
created directory `C:/Program Files/OpenSSL/lib/engines-1_1'
ACKNOWLEDGEMENTS AUTHORS CHANGES CONTRIBUTING Configurations Configure FAQ INSTALL LICENSE Makefile.shared NEWS NOTES.DJGPP NOTES.PERL NOTES.VMS NOTES.WIN NUL README README.ECC README.ENGINE README.FIPS VMS app.pdb apps appveyor.yml boringssl build.info config config.com configdata.pm crypto demos doc e_os.h engines external fuzz include libcrypto.lib libssl.lib makefile ms os-dep ossl_static.pdb ssl test tools util Installing runtime files
created directory `C:/Program Files/OpenSSL/bin'
Need at least two filenames at .\util\copy.pl line 39.
NMAKE : fatal error U1077: 'c:\Perl64\bin\perl.exe' : return code '0xff'
Stop.

So, ActiveState Perl is mandatory on Windows environment. But even with it, nmake install still gives copy file error.

BLDDIR=.
INSTALL_LIBS=libcrypto.lib libssl.lib

Note, I build with

  • no-shared
  • no-stdio

Could it be the installation script assumed they are mandatory?

@levitte

This comment has been minimized.

Copy link
Member

commented Dec 7, 2016

Errrrrr.... you're running this in a bash type shell, aren't you? Those weird lines are the result of this line in makefile:

	@echo *** Installing development files

so uhmmmm, fairly innocuous, even though annoying.

BUT! This shows that you have an environment mixture we do not support. I assume that you're running in a MSYS/Mingw shell, and in that case, building for mingw is the supported option. In that case, you should follow the installation instruction for Unix, since that's the environment the MSYS/Mingw shell emulates.

If you absolutely want to build with VC, it should be done in an environment that lends itself better for it, i.e. cmd (the standard command prompt or similar)

@davidshen84

This comment has been minimized.

Copy link
Author

commented Dec 7, 2016

No, I am not in a msys shell, or a cygwin shell. I used the VS developer console, which provides environment for nmake, with elevated privilege, that's all.

@JohnTian

This comment has been minimized.

Copy link

commented Dec 21, 2016

I also encountered this issue.

  • Windows 7 Ultimate 64bit OS
  • dwimperl-5.14.2.1-v7-32bit.exe
  • nasm-2.12.02-installer-x86.exe
  • openssl-1.1.0c.tar.gz
  • Setting environment for using Microsoft Visual Studio 2010 x86 tools. VS developer console, which provides environment for nmake, with administrator privilege.

Steps like following:

D:\openssl-1.1.0c> perl Configure VC-WIN32 --prefix=D:/Projects/visualstudio/MyCurl/openssl
D:\openssl-1.1.0c> nmake
D:\openssl-1.1.0c> nmake test
D:\openssl-1.1.0c> nmake install

After nmake test, I got this result.

All tests successful.
Files=89, Tests=429, 90 wallclock secs ( 0.59 usr +  0.31 sys =  0.91 CPU)
Result: PASS
"Tests are not supported with your chosen Configure options"

But by typing nmake install, I got

*** Installing development files
Can't Open "./ms/applink.c" at .\util\copy.pl line 61.
NMAKE : fatal error U1077: “D:\ProgramFiles\Dwimperl\perl\bin\perl.exe”: 返回代码“0x16”
Stop.

Both ./ms/applink.c and .\util\copy.pl are exist!

@levitte

This comment has been minimized.

Copy link
Member

commented Dec 21, 2016

dwimperl-5.14.2.1-v7-32bit.exe

That's a perl variant I haven't heard of before.

NMAKE : fatal error U1077: “D:\ProgramFiles\Dwimperl\perl\bin\perl.exe”: 返回代码“0x16”

Unfortunately, I don't know whichever language that is (japanese? chinese? something else that uses Kanji?), could you help decipher it?

@davidshen84

This comment has been minimized.

Copy link
Author

commented Dec 21, 2016

@JohnTian

This comment has been minimized.

Copy link

commented Dec 22, 2016

@levitte Thanks for your early reply.

  1. dwimperl-5.14.2.1-v7-32bit.exe was downloaded from perl official web.

DWIM Perl for Windows: A 100% Open Source Perl for Windows, based on Strawberry Perl. It aims to include as many useful CPAN modules as possible. It even comes with Padre, the Perl IDE.

  1. 返回代码 is Chinese which says "error code 0x16".
@JohnTian

This comment has been minimized.

Copy link

commented Dec 22, 2016

@levitte @davidshen84 It's work and solved "error code 0x16" after i uninstalled dwimperl-5.14.2.1-v7-32bit.exe and installed Strawberry Perl.

@richsalz

This comment has been minimized.

Copy link
Contributor

commented Dec 22, 2016

glad you got it working. closing this.

@richsalz richsalz closed this Dec 22, 2016

@jackeri

This comment has been minimized.

Copy link

commented Jun 5, 2017

I have this exact error with OpenSSL_1_1_0f branch atleast.

Setup:

  • Visual Studio 2015 developer prompt (cmd)
  • ActiveState perl 5.22.3
  • Nasm 2.13

Full configure line:
perl.exe Configure VC-WIN32 --prefix=D:/Programming/openssl --openssldir=D:/Programming/openssl no-shared no-stdio no-tests

Configure&compile runs fine but when running the nmake install step the error happens as in the issue description:

*** Installing runtime files
created directory `D:/Programming/openssl/bin'
Need at least two filenames at .\util\copy.pl line 39.
NMAKE : fatal error U1077: 'C:\Jeren\Software\Perl64\bin\perl.exe' : return code '0xff'
Stop.

@ghost

This comment has been minimized.

Copy link

commented Feb 12, 2018

I have the same issue

  • Windows 10
  • Visual Studio 2017 Command Prompt
  • Strawberry Perl 5.26.1.1-64bit
perl Configure no-asm no-shared no-tests --prefix=D:/install VC-WIN64A
nmake
nmake install

Build completes successfully but the installation fails

Cannot create directory C:/Program Files (x86)/Common Files/SSL: No such file or directory
NMAKE : fatal error U1077: "C:\Strawberry\perl\bin\perl.exe": return code "0x2"

The set prefix seems to be ignored during installation

Any suggestions?

@ghost

This comment has been minimized.

Copy link

commented Feb 16, 2018

Setting prefix and openssldir to the same directory fixed the issue for me.

@sh1ftchg

This comment has been minimized.

Copy link

commented Jul 8, 2018

Sorry to reply to a closed issue... This is just FYI for those still having issues.

Fix

To install on windows - nmake install - run the command prompt as administrator; this is a must. It's probably best only to do so for the install step... The problem is windows permissions, not install directories or anything of the sort.

@dongbum

This comment has been minimized.

Copy link

commented May 9, 2019

Setting prefix and openssldir to the same directory fixed the issue for me.

Great answer, thanks this fixed my issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.