Comments (8)
Two problems:
1.) The MinGW distribution you're using does not put standard UNIX tools on the PATH
, most critically a shell sh
. To me this seems pretty broken and you should report it to the author of the distribution (how is anyone's makefile supposed to work without a sh
?). Oddly enough, the distribution does include such tools in its git\bin
and git\usr\bin
directories and they do appear to work, but they are not added to PATH
by the batch script you're supposed to run.
2.) The MinGW distribution only installs the compiler as plain gcc
, not as x86_64-w64-mingw-gcc
. This means you'll need to build with make CC=gcc
. I also found that libdeflate's Makefile did not work properly in this (somewhat legitimate) case, so I've fixed it and also updated the README.
from libdeflate.
That's very helpful. At first I was puzzled by your references to git\bin and git\usr\bin since I didn't have any such directories in the MinGW install. Then I realized I chose his "without-git" build since I already have git installed separately. I had no idea I needed to put sh on my path until now. So I did that and the build runs through to the error at bottom:
CC lib/aligned_malloc.pic.o
CC lib/deflate_decompress.pic.o
CC lib/x86_cpu_features.pic.o
CC lib/deflate_compress.pic.o
CC lib/adler32.pic.o
CC lib/zlib_decompress.pic.o
CC lib/zlib_compress.pic.o
CC lib/crc32.pic.o
CC lib/gzip_decompress.pic.o
CC lib/gzip_compress.pic.o
CCLD libdeflate.so
CC lib/aligned_malloc.o
CC lib/deflate_decompress.o
CC lib/x86_cpu_features.o
CC lib/deflate_compress.o
CC lib/adler32.o
CC lib/zlib_decompress.o
CC lib/zlib_compress.o
CC lib/crc32.o
CC lib/gzip_decompress.o
CC lib/gzip_compress.o
AR libdeflate.a
GEN programs/config.h
CC programs/gzip.o
CC programs/prog_util.o
CC programs/tgetopt.o
CCLD gzip
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:177: gzip] Error 1
Any ideas? I'm not sure what these Linux .a binaries are doing in this context.
Conversely, I was able to successfully compile using nmake, but that took a lot of digging and modifications to the .msc file, pointing it to the right includes, and only succeeds when using a special VS command line interface. I can write that up separately. The Windows C runtime and libraries were refactored for Windows 10, and relocated.
from libdeflate.
That's what I was referencing in (2); the Makefile didn't detect that just gcc
could be MinGW. If you use the latest "master" from the git repository it should work.
from libdeflate.
I'm also surprised to hear that the Visual Studio / MSC build was so difficult to get working. I understand that for the command-line Microsoft tools to work at all to build any program, you need to have your command prompt set up with the appropriate environmental variables by using the dedicated shortcut or by sourcing vcvarsall
. So that is a given. With regards to things being changed for Windows 10, I cannot say one way or another, but I would be surprised for them to have broken everything. But if you believe any specific changes are needed on my side then please go ahead and propose them (I don't regularly use the Microsoft tools).
from libdeflate.
Ah, sorry. Now it works!
On the nmake side, I had to add these paths to CFLAGS: -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\ucrt" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"
And I had to use the Visual Studio x64 Native Tools Command Prompt (the one highlighted in the attached screenshot -- there are lots of command prompts.) If I use any other, I always get a linker error that it can't open msvcrt.lib. It's a mess.
from libdeflate.
Hmm. Well, I am closing this issue since your original problem was resolved, to the extent I could on my side. Feel free to do some more research into the problems with VS2015 if you are interested.
from libdeflate.
Roger that. Thanks for your help.
from libdeflate.
Roger that. Thanks for your help.
D:\software\libdeflate>make
此时不应有 -Wpedantic。
此时不应有 -Wdeclaration-after-statement。
此时不应有 -Wmissing-prototypes。
此时不应有 -Wstrict-prototypes。
此时不应有 -Wvla。
系统找不到指定的路径。
'flags' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Makefile:179: recipe for target '.lib-cflags' failed
make: *** [.lib-cflags] Error 1
I want to build the project on windows 10 with MinGW,but I get the error.who can help me?
from libdeflate.
Related Issues (20)
- aarch64 build failure HOT 5
- arm build failure with soft float HOT 2
- Improve hc_matchfinder_longest_match() performance on Apple Silicon HOT 3
- Reject all DEFLATE streams that zlib rejects HOT 5
- CMake error with install target, with Visual Studio HOT 1
- Suggestion to publish your GPG keys more HOT 2
- Speed Benchmark: libdeflate vs BWTSATAN, BSC, 7zip, ZSTD, LZ4, LZSSE, BriefLZ, Satanichi HOT 2
- Build type does not default to Release with CMake 3.10 and earlier HOT 5
- Version `1.8` is able to decompress data that version `1.17` cannot, but only on Windows HOT 9
- Comparison to zlib and its forks HOT 2
- POSITION_INDEPENDENT_CODE ON for static compilations HOT 2
- v1.14 - v1.18 deflate compatibility HOT 5
- Decompressing Microsoft DOCX Files in Unreal Engine 5 with Libdeflate HOT 4
- Windows Explorer cannot unpack some files generated with libdeflate (reward offered) HOT 9
- Tests fail on Windows in Release mode with VS platform toolset v141 HOT 1
- Please also generate a static source code archive for release HOT 2
- Libdeflate compressed stream in kunzip fail to decompress HOT 12
- Slow level 0 "compression" HOT 2
- I added stream & multi-thread support for libdeflate HOT 16
- ESA matchfinder HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libdeflate.