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

libiconv/1.17: "/bin/sh: line 1: c:mingw64bingcc.exe: command not found" #20204

Closed
Odinaka-git opened this issue Sep 29, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Odinaka-git
Copy link

Description

I'm trying to download libiconv/1.17. it seems like at compile time, the c:mingw64bingcc.exe cannot be found, and it prevents libiconv from being built. I've downloaded two mingw64s, one with msys2 and another from this website https://winlibs.com/ which I extracted to C:\mingw64. I've added both to the system path but the error still prevails. was wondering if I could get help solving this problem. I'd like to add that in my conan profile, I've set the CC and CXX compilers to the mingw64 downloaded without the msys2.

Package and Environment Details

  • Package Name/Version: libiconv/1.17
  • Operating System+version: windows
  • Compiler+version: GCC 13.1
  • Docker image: non
  • Conan version: conan 1.61.0
  • Python version: Python 3.11.5

Conan profile

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.version=13.1
compiler.libcxx=libstdc++11
build_type=Release

[options]

[build_requires]

[env]
CC = C:\mingw64\bin\gcc.exe
CXX = C:\mingw64\bin\g++.exe

Steps to reproduce

conan install conanfile.txt --build=missing

Logs

Click to expand log
Put your log output here

make[2]: Entering directory '/c/Users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/build-release/srclib'
C:\mingw64\bin\gcc.exe -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/src/srclib -I.. -I../lib  -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG   -m64 -O3 -c -o libicrt_a-allocator.o `test -f 'allocator.c' || echo '/c/users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/src/srclib/'`allocator.c
C:\mingw64\bin\gcc.exe -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/src/srclib -I.. -I../lib  -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG   -m64 -O3 -c -o libicrt_a-areadlink.o `test -f 'areadlink.c' || echo '/c/users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/src/srclib/'`areadlink.c
C:\mingw64\bin\gcc.exe -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/src/srclib -I.. -I../lib  -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG   -m64 -O3 -c -o libicrt_a-basename-lgpl.o `test -f 'basename-lgpl.c' || echo '/c/users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/src/srclib/'`basename-lgpl.c
/bin/sh: line 1: C:mingw64bingcc.exe: command not found
make[2]: *** [Makefile:1576: libicrt_a-allocator.o] Error 127
make[2]: *** Waiting for unfinished jobs....
/bin/sh: line 1: C:mingw64bingcc.exe: command not found
make[2]: *** [Makefile:1582: libicrt_a-areadlink.o] Error 127
/bin/sh: line 1: C:mingw64bingcc.exe: command not found
make[2]: *** [Makefile:1588: libicrt_a-basename-lgpl.o] Error 127
make[2]: Leaving directory '/c/Users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/build-release/srclib'
make[1]: *** [Makefile:1500: all] Error 2
make[1]: Leaving directory '/c/Users/7000035176/.conan/data/libiconv/1.17/_/_/build/a86b08dfda6e449c9658163512714d447bd0edff/build-release/srclib'
make: *** [Makefile:34: all] Error 2
libiconv/1.17:
libiconv/1.17: ERROR: Package 'a86b08dfda6e449c9658163512714d447bd0edff' build failed
libiconv/1.17: WARN: Build folder C:\Users\7000035176\.conan\data\libiconv\1.17\_\_\build\a86b08dfda6e449c9658163512714d447bd0edff\build-release
ERROR: libiconv/1.17: Error in build() method, line 126
        autotools.make()
        ConanException: Error 2 while executing make -j16

</details>
@Odinaka-git Odinaka-git added the bug Something isn't working label Sep 29, 2023
@SpaceIm
Copy link
Contributor

SpaceIm commented Sep 29, 2023

Try to change CC to C:/mingw64/bin/gcc.exe and CXX to C:/mingw64/bin/g++.exe. Env vars are not curated when they are passed to Autotools builds , but tools.build:compiler_executables paths are curated (at least since conan 2.0.5 conan-io/conan#13867, I don't know whether it has been backported to conan v1).

[settings]
os=Windows
arch=x86_64
build_type=Release
compiler=gcc
compiler.version=13.1
compiler.libcxx=libstdc++11
build_type=Release
[conf]
tools.build:compiler_executables={"c": "C:/mingw64/bin/gcc.exe", "cpp": "C:/mingw64/bin/g++.exe"}
[tool_requires]
[buildenv]

# legacy
[env]
CC=C:/mingw64/bin/gcc.exe
CXX=C:/mingw64/bin/g++.exe

@Odinaka-git
Copy link
Author

Thank you, that solved the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants