R-macos / recipes

System for building static dependent libraries for CRAN packages
44 stars 17 forks source link

Add libtool to match other sysreq dbs #44

Closed theAeon closed 1 year ago

theAeon commented 1 year ago

I need libtoolize for a package I'm preparing to submit to CRAN and have added it to the other sysreq databases-I believe this is the last one.

theAeon commented 1 year ago

yk i probably should have made sure that this worked first hold on

s-u commented 1 year ago

Apple provides its own libtool and you should definitely not use libtoolize in a package since it means you have not built it properly. I'd be happy to help you fix your package if you give us more pointers.

theAeon commented 1 year ago

Just trying to embed a static stripped-down open-mpi/hwloc and they have an autogen script-one that ends up calling libtoolize by way of autoreconf. Can't say I know much more about their build system.

s-u commented 1 year ago

That's fine, but you should call that when you are building the package source tar ball - all autoconf/automake/libtool calls are made then to make sure the package tar ball includes all artifacts. None of those tools are needed by the user when installing the package.

theAeon commented 1 year ago

That's the rub, really. I'm pulling their repo at configure time. Its not a dependency of the binary distribution, for obvious reasons, but its a bit hard to make those calls on source files I haven't yet retrieved.

edit: maybe the correct way to do this is to just have a copy of hwloc in here

s-u commented 1 year ago

You can't do that - you'll need to include the sources in your package, you cannot even assume internet connectivity let alone extra tools.

theAeon commented 1 year ago

...the CRAN policy says versioned downloads are okay for larger source dependencies. Regardless, I do check for a copy of the library before trying to build it, so maybe it makes more sense to just do that.

s-u commented 1 year ago

Yes, but that means you create a tar ball of all sources you need (with artifacts!) and store the hash in the package so it can be verified. Again, that's ok, but you ship the complete sources which already include configure etc. so the user doesn't need any of it. Still, it should be avoided if practical.