Gcenx / macports-wine

Updated wine Portfiles for macports
89 stars 11 forks source link

mingw32 bootstrap fails to find MPC when using custom prefix #42

Closed contextnerror closed 1 year ago

contextnerror commented 1 year ago

I wanted to try keeping the wine ports in their own prefix to manage them separately from my other ports. This didn't work. i686-w64-mingw32-gcc-bootstrap fails at the configure step, specifically when looking for MPC.

configure:8205: checking for the correct version of mpc.h
configure:8222: /usr/bin/clang -c -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -I/opt/merlot/include -I/opt/merlot/include -I/opt/merlot/include  -I/opt/merlot/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk conftest.c >&5
In file included from conftest.c:11:
/opt/merlot/include/mpc.h:287:35: error: unknown type name 'FILE'
__MPC_DECLSPEC void mpcr_out_str (FILE *f, mpcr_srcptr r);
                                  ^
1 error generated.
configure:8222: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define HAVE_CXX11 1
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include <mpc.h>
| int
| main ()
| {
| 
|     #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
|     choke me
|     #endif
| 
|   ;
|   return 0;
| }
configure:8247: result: no
configure:8305: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
https://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.

For reference, the prefix was configured with these arguments: --prefix=/opt/merlot --with-applications-dir=/opt/merlot/Applications --without-startupitems --with-curlprefix=/opt/bootstrap

Logfiles are included. They are: bad-config: config log from custom prefix good-config: config log from running sudo /opt/local/bin/port configure i686-w64-mingw32-gcc-bootstrap, which works fine main: wine-devel log Terminal Saved Output: All output, from initial clone to failure

bad-config.log good-config.log main.log Terminal Saved Output.txt

Gcenx commented 1 year ago

Could you provide the main.log for i686-w64-mingw32-gcc-bootstrap

contextnerror commented 1 year ago

Sorry, not sure how I missed that. Here. main.log

Gcenx commented 1 year ago

That’s very strange as the relevant configure options are being passed to help configure find the requested headers…

Gcenx commented 1 year ago

Started to dig into this more and see it does find the header but can’t find a function, checked Macports-ports and they’ve already resolved the issue on there end https://github.com/macports/macports-ports/commit/9332dbb202005f90c4aa5c9e069edeb4d804d117

You’ll need to do selfupdate and upgrade all installed ports and then it should work.

contextnerror commented 1 year ago

Yup, that fixed it.