Opened 7 years ago

Closed 5 years ago

#26 closed defect (worksforme)

Error Zlib compiling Couenne on MacOSX 10.6.8

Reported by: mbehr Owned by:
Priority: major Milestone:
Component: ThirdParty Version:
Keywords: Cc:

Description

Hello, i want to build Couenne with HSL MA57. I downloaded all Third Party Packages and put the files for MA57 (ddeps.f, fakemetis.f, ma57d.f, ma57s.f, sdeps.f) in a single file called ma57ad.f. Then i call

CC=gcc-mp-4.7 CXX=g++-mp-4.7 F77=gfortran-mp-4.7 ../configure -C --with-metis-datadir="/Users/behr/bin/Couenne/ThirdParty/Metis/"

and i get the follwing error: In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1347:21: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPfgetc': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:88:11: error: request for member 'have' in something not a structure or union ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:88:11: error: request for member 'have' in something not a structure or union ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:88:11: error: request for member 'pos' in something not a structure or union ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:88:11: warning: left-hand operand of comma expression has no effect [-Wunused-value] ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:88:11: error: request for member 'next' in something not a structure or union ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:88:11: warning: left-hand operand of comma expression has no effect [-Wunused-value] ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:88:4: warning: passing argument 1 of 'gzgetc' from incompatible pointer type [enabled by default] In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1374:21: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPfgets': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:93:4: warning: passing argument 1 of 'gzgets' from incompatible pointer type [enabled by default] In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1355:24: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPfflush': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:98:4: warning: passing argument 1 of 'gzflush' from incompatible pointer type [enabled by default] In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1395:21: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPfseek': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:103:4: warning: passing argument 1 of 'gzseek' from incompatible pointer type [enabled by default] In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1709:28: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPrewind': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:108:4: warning: passing argument 1 of 'gzrewind' from incompatible pointer type [enabled by default] In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1430:24: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPftell': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:113:4: warning: passing argument 1 of 'gztell' from incompatible pointer type [enabled by default] In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1710:28: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPfeof': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:118:4: warning: passing argument 1 of 'gzeof' from incompatible pointer type [enabled by default] In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1458:21: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPfclose': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:123:4: warning: passing argument 1 of 'gzclose' from incompatible pointer type [enabled by default] In file included from ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:35:0: /opt/local/include/zlib.h:1494:24: note: expected 'gzFile' but argument is of type 'struct gzFile_s ' ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c: In function 'SCIPfgetc': ../../../ThirdParty?/SCIP/scip/src/scip/fileio.c:89:1: warning: control reaches end of non-void function [-Wreturn-type] make[2]: * [scip/src/scip/fileio.lo] Error 1 make[1]: * [all] Error 2 make: * [all-recursive] Error 1

Can someone help me please? thanks

Attachments (4)

config.log (40.9 KB) - added by mbehr 7 years ago.
make_test.txt (47.2 KB) - added by mbehr 7 years ago.
make_debug.txt (92.6 KB) - added by mbehr 7 years ago.
configure_withoutmetisdatadir.txt (44.3 KB) - added by mbehr 7 years ago.

Download all attachments as: .zip

Change History (20)

Changed 7 years ago by mbehr

comment:1 follow-up: Changed 7 years ago by stefan

You probably use a Couenne that uses a quite old SCIP version.

The problem looks familar to me and I believe to have this fixed some years ago.

Anyhow, the easiest workaround should be to configure with --disable-zlib.

Alternatively, try replacing scip/src/scip/fileio.c with one from a more recent SCIP version.

Finally, Couenne is also well functional without SCIP, since the latter is only used in one heuristic that is off by default anyway.

Stefan

Changed 7 years ago by mbehr

comment:2 in reply to: ↑ 1 Changed 7 years ago by mbehr

Replying to stefan:

You probably use a Couenne that uses a quite old SCIP version.

The problem looks familar to me and I believe to have this fixed some years ago.

Anyhow, the easiest workaround should be to configure with --disable-zlib.

Alternatively, try replacing scip/src/scip/fileio.c with one from a more recent SCIP version.

Finally, Couenne is also well functional without SCIP, since the latter is only used in one heuristic that is off by default anyway.

Stefan

Hello i added --disable-zlib to configure. Build process works properly, but make test failed. The Output of make test is attached. Hope you can help me. thanks a lot

comment:3 Changed 7 years ago by stefan

You may wanna compile in debug mode (configure --enable-debug) and run a debugger to see where Couenne is crashing.

comment:4 Changed 7 years ago by mbehr

i added the flag to configure but now i get the following error during build process (attached)

Changed 7 years ago by mbehr

comment:5 Changed 7 years ago by stefan

Maybe it did not recompile Metis in debug mode.

Originally, you added --with-metis-datadir="/Users/behr/bin/Couenne/ThirdParty/Metis/" to your configure flags. I don't see what you need this for.

Try removing your complete build directory and redo configure and build. Mac OS X has always been a platform with it's own issues.

comment:6 Changed 7 years ago by mbehr

Hi, if i do not add the flag

--with-metis-datadir="/Users/behr/bin/Couenne/ThirdParty/Metis/" metis will

note be found. See the error message attached. thanks for your help

Changed 7 years ago by mbehr

comment:7 Changed 7 years ago by stefan

Well, I guess you may not have metis.

configure looks for the file ThirdParty/METIS/metis-4.0/Lib/balance.c to check whether the METIS source is present.

PS: Metis 5 will not work.

comment:8 Changed 7 years ago by mbehr

Hi, i download metis with the get.Metis Script. I have Metis, because i got

Maximilian-Behrs-MacBook-Pro-15:build behr$ ls /Users/behr/bin/Couenne/ThirdParty/Metis/metis-4.0/Lib/bal*

/Users/behr/bin/Couenne/ThirdParty/Metis/metis-4.0/Lib/balance.c thanks for your help.

comment:9 Changed 7 years ago by stefan

When configure runs, it should also run configure in ThirdParty/Metis?. If that happens, do you have a file /Users/behr/bin/Couenne/build/ThirdParty/Metis/coinmetis-uninstalled.pc ?

Does

PKG_CONFIG_PATH=/Users/behr/bin/Couenne/build/ThirdParty/Metis/ pkg-config --libs coinmetis

report something that seems correct?

Stefan

comment:10 Changed 7 years ago by mbehr

Hi, no i dont have the file in Metis

Maximilian-Behrs-MacBook-Pro-15:build behr$ ls /Users/behr/bin/Couenne/ThirdParty/Metis/coin*

/Users/behr/bin/Couenne/ThirdParty/Metis/coinmetis-uninstalled.pc.in

/Users/behr/bin/Couenne/ThirdParty/Metis/coinmetis.pc.in

PKG-config delivers Maximilian-Behrs-MacBook-Pro-15:build behr$ PKG_CONFIG_PATH=/Users/behr/bin/Couenne/build/ThirdParty/Metis/ pkg-config --libs coinmetis

Package coinmetis was not found in the pkg-config search path. {{{Perhaps you should add the directory containing `coinmetis.pc' to the PKG_CONFIG_PATH environment variable}}} No package 'coinmetis' found

thank you

comment:11 Changed 7 years ago by stefan

I thought you build in /Users/behr/bin/Couenne/build/.

So please check /Users/behr/bin/Couenne/build/ThirdParty/Metis/coinmetis-uninstalled.pc.

The .pc files is setup by configure. ThirdParty/HSL uses them to get information about how to link against Metis.

Stefan

comment:12 Changed 7 years ago by mbehr

Oh sorry my Mistake, i have not metis directory in the build/ThirdParty folder Maximilian-Behrs-MacBook-Pro-15:build behr$ ls /Users/behr/bin/Couenne/build/ThirdParty/

ASL Blas HSL Lapack

Max

Last edited 7 years ago by mbehr (previous) (diff)

comment:13 Changed 7 years ago by stefan

Yes, configure does not configure ThirdParty/Metis? if --with-metis-datadir has been given. You should not specify it unless you also specify --with-metis-lib and --with-metis-incdir.

Stefan

comment:14 Changed 7 years ago by mbehr

Hi, i called

CC=gcc-mp-4.7 CXX=g++-mp-4.7 F77=gfortran-mp-4.7 ../configure -C

after that i got the error

checking whether to enable maintainer-specific portions of Makefiles... no
configure: Using libtool script in directory ../..
checking if library version is set... 4:2:3
checking whether we can compile Fortran 90 code... yes
checking for COIN-OR package Metis... not given: No package 'coinmetis' found
configure: error: MA57 requires METIS, which is not found.
configure: error: /bin/sh '../../../ThirdParty/HSL/configure' failed for ThirdParty/HSL

There is also no Metis folder in build/Thirdparty/

Maximilian-Behrs-MacBook-Pro-15:build behr$ ls ThirdParty/ ASL Blas HSL Lapack

Max

comment:15 Changed 7 years ago by stefan

Then it can only be that the main configure did not recognize that the Metis source is present.

The check is around line 21601 (I assume you use the latest Couenne release): https://projects.coin-or.org/Couenne/browser/releases/0.4.3/configure#L21601

Please check why this test fails.

Stefan

comment:16 Changed 5 years ago by pbelotti

  • Resolution set to worksforme
  • Status changed from new to closed

Max, please let us know if you are still encountering this problem. I'm going to close this ticket as the issue seems to have to do with proper config rather than zlib.

Note: See TracTickets for help on using tickets.