MiKTeX / miktex

the MiKTeX source code
https://miktex.org
Other
804 stars 95 forks source link

Build Error for MiKTeX on macOS: curl: (22) The requested URL returned error: 404 #1548

Closed KylinGuo closed 6 days ago

KylinGuo commented 1 week ago

Description:

I attempted to compile MiKTeX from source on macOS as the precompiled binary (miktex-22.1-darwin-x86_64.dmg) does not work for my setup. I followed the official build guide available at https://miktex.org/howto/build-mac. However, during the build process, the make command failed with the following error messages:

% cd miktex-24.4
% mkdir build && cd build/
% pwd
/Users/guoqilin/Downloads/miktex-24.4/build
% brewprefix="`brew --prefix`"
% export CMAKE_PREFIX_PATH="${brewprefix}/opt/icu4c:${brewprefix}/opt/openssl:${brewprefix}/opt/icu4c:${brewprefix}/opt/qt:${CMAKE_PREFIX_PATH}"
% cmake ../ > cmake_stdout.txt 2> cmake_stderr.txt &
% make > make_stdout.txt 2> make_stderr.txt &
% cat make_stderr.txt
curl: (22) The requested URL returned error: 404
make[2]: *** [miktex-zzdb1-2.9.tar.lzma] Error 22
make[1]: *** [CMakeFiles/gen-bootstrapping-files.dir/all] Error 2
make: *** [all] Error 2

Steps to Reproduce:

  1. Download the MiKTeX source code (miktex-24.4) from the official website.
  2. Follow the build instructions provided in the MiKTeX macOS build guide.
  3. Run the following commands in the build directory:
    cmake ../ > cmake_stdout.txt 2> cmake_stderr.txt &
    make > make_stdout.txt 2> make_stderr.txt &
  4. Observe the error in make_stderr.txt.

    Observed Behavior:

    The build process fails with the error:

    curl: (22) The requested URL returned error: 404
    make[2]: *** [miktex-zzdb1-2.9.tar.lzma] Error 22

    Expected Behavior:

    The build process should complete successfully without errors, downloading all required dependencies.

    Environment:

    • Operating System: macOS (15.1)
      % sw_vers
      ProductName:        macOS
      ProductVersion:     15.1
      BuildVersion:       24B2082
      % uname -a
      Darwin guoqilindeMacBook-Pro.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:06:57 PDT 2024; root:xnu-11215.41.3~3/RELEASE_ARM64_T6041 arm64
      % sysctl -n machdep.cpu.brand_string
      Apple M4 Pro
    • CMake Version: 3.31.0
      
      % cmake --version
      cmake version 3.31.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

- Compiler: Apple clang version 16.0.0 (clang-1600.0.26.4)
```zsh
% cc --version
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Emacs Lisp files have been installed to: /opt/homebrew/share/emacs/site-lisp/cmake ==> Analytics install: 119,954 (30 days), 372,635 (90 days), 1,593,550 (365 days) install-on-request: 89,854 (30 days), 277,601 (90 days), 1,232,395 (365 days) build-error: 880 (30 days)


[cmake_stderr.txt](https://github.com/user-attachments/files/17802304/cmake_stderr.txt)
[cmake_stdout.txt](https://github.com/user-attachments/files/17802305/cmake_stdout.txt)
[make_stderr.txt](https://github.com/user-attachments/files/17802306/make_stderr.txt)
[make_stdout.txt](https://github.com/user-attachments/files/17802307/make_stdout.txt)
KylinGuo commented 1 week ago

This problem could be solved by export variable MIKTEX_REPOSITORY:

export MIKTEX_REPOSITORY=https://mirrors.aliyun.com/CTAN/systems/win32/miktex/tm/packages/