Help with a Portfile (part 2)
ryandesign at macports.org
Tue Jan 15 23:35:05 UTC 2019
On Jan 15, 2019, at 15:55, Eric F (iEFdev) wrote:
> Thanks for all the help with last one. 👍
> Now I'm doing the other (last) one(s), and I'm not really sure how to do this.
> It's a 2 part install. C lib (dependency) + a module.
> - https://github.com/maxmind/libmaxminddb/
> - https://github.com/maxmind/mod_maxminddb/
> The C lib builds and installs fine, but the module throw me some errors.
> > :info:build /opt/local/bin/apxs -c -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -lmaxminddb -Wc,"-pipe -Os -arch x86_64 -std=c99 -fms-extensions"
> > :info:build apxs:Error: Unknown option: r.
> > :info:build apxs:Error: Unknown option: h.
> I could build it manually in it's folder with:
> $ sudo LDFLAGS=-L/opt/local/lib ./configure --prefix=/opt/local --with-apxs=/opt/local/bin/apxs
> $ sudo make
Sounds like apxs doesn't like the -arch flag, so don't pass that to it. Maybe using "-Wl,-arch,x86_64" instead of "-arch x86_64" is what you need. Or maybe you don't need an -arch flag at all.
> My default i gcc (7, I think)
> So I tried with (just to compare):
> configure.compiler macports-clang-5.0 // didn't work
> configure.compiler macports-gcc-5
> // worked
> Also tried to blacklist some compliers, etc.
> So, how to chose/setup a suitable compiler? and… if going with gcc, doesn't the C lib have to use the same as well then?
Please don't attempt to make the Portfile use gcc. We want to use clang.
More information about the macports-dev