Opened 12 months ago

Last modified 12 months ago

#53058 new defect

nsis @3.0.1: build fails on 10.6 due to a missing zlib

Reported by: mojca (Mojca Miklavec) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: snowleopard Cc: ryandesign (Ryan Schmidt)
Port: nsis

Description

See the build log:

/usr/bin/c++ --version
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Checking for C library gdi32... no
Checking for C library user32... no
Checking for C library pthread... no
Checking for C library iconv... no
Checking for C library shlwapi... no
Checking for C library z... no
zlib (darwin) is missing!
Command failed:  cd "/path/to/nsis/work/nsis-3.01-src" && scons PREFIX="/opt/local" CC="/usr/bin/cc" CXX="/usr/bin/c++"  APPEND_CCFLAGS="-stdlib=libstdc++" APPEND_LINKFLAGS="-stdlib=libstdc++"  STRIP=0 SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all 

Change History (5)

comment:1 Changed 12 months ago by ryandesign (Ryan Schmidt)

  • Summary changed from nsis: build fails on 10.6 due to a missing zlib to nsis @3.0.1: build fails on 10.6 due to a missing zlib

I've reported it to the developers: https://sourceforge.net/p/nsis/bugs/1169/

comment:2 Changed 12 months ago by mojca (Mojca Miklavec)

  • Cc ryandesign added

Ryan, this might just as well be due to the wrong compiler or wrong flags (I guess we should not add -stdlib=... when not using clang for example). I tested it now and if I switch to macports-clang-3.4, then it works correctly.

comment:3 Changed 12 months ago by mojca (Mojca Miklavec)

And in fact when I remove the -stdlib=..., the port builds even with the default compiler.

We should probably use

if {[string match *clang* ${configure.cxx}]} {
    ...
}

or something along those lines.

Or we should probably use ${configure.cxxflags} (or one of other flags) directly? I guess that stdlib would be added automatically/properly then. The only minor problem is that C and C++ both seem to use the same flags (not 100% sure, I didn't check the source code), but maybe cxxflags would work.

Last edited 12 months ago by mojca (Mojca Miklavec) (previous) (diff)

comment:4 Changed 12 months ago by ryandesign (Ryan Schmidt)

Yes that all sounds right.

comment:5 Changed 12 months ago by mojca (Mojca Miklavec)

I would have done it already, but I'm not quite sure which flags belong where.

Note: See TracTickets for help on using tickets.