Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#45760 closed enhancement (wontfix)

assimp: Add a noboost variant

Reported by: drew@… Owned by: mamoll (Mark Moll)
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc:
Port: assimp

Description

This is a request to add a noboost variant to assimp.

This can theoretically be accomplished in 3.0.1270 with

variant noboost description {Builds a non-thread safe version without boost dependency} {
	depends_lib-delete port:boost
	configure.args-append -DASSIMP_ENABLE_BOOST_WORKAROUND=YES
}

but my built libraries have been broken.

Boost 3.1.1 fixes a bug where the config flag is supplied if boost is not found, so

variant softboostdep description {Builds a non-thread safe version if boot is not found} {
	depends_lib-delete port:boost
}

can theoretically be used to create a soft dependency.

Thank you!

Attachments (1)

Portfile.diff (1.7 KB) - added by mamoll (Mark Moll) 9 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to mmoll@…
Summary: Add a noboost variant to assimpassimp: Add a noboost variant

We no longer add variants whose names begin with "no".

comment:2 in reply to:  1 ; Changed 9 years ago by drew@…

Replying to ryandesign@…:

We no longer add variants whose names begin with "no".

Dang. Boost is such a heavy dependency. Would it be feasible to make the noboost version the default?

comment:3 in reply to:  2 Changed 9 years ago by larryv (Lawrence Velázquez)

Replying to drew@…:

Dang. Boost is such a heavy dependency. Would it be feasible to make the noboost version the default?

All Ryan means is that we could add a boost variant that enables Boost support. Whether that variant would be selected by default or not would be up to the maintainer.

Last edited 9 years ago by larryv (Lawrence Velázquez) (previous) (diff)

comment:4 Changed 9 years ago by larryv (Lawrence Velázquez)

This would also make things very hairy if there are any ports that depend on assimp and are sensitive to its thread-safety (or lack thereof).

comment:5 Changed 9 years ago by mamoll (Mark Moll)

I see that Drew gives two reasons to get rid of the boost dependency:

  • It breaks his code.
  • Boost is a large dependency.

Neither seem like a very compelling reason to get rid of Boost, esp. since Boost is already compiled for everything but OS X 10.10 and is used by many other ports (i.e., many users are bound to install it anyway). Can you say more why Boost / thread-safety makes your libraries broken?

comment:6 Changed 9 years ago by drew@…

(I didn't realize I couldn't reply directly to the email list.)

I didn't say that clearly enough. My attempts to build assimp in macports with the boost workaround resulted in a broken binary that I haven't had a chance to debug.

Sadly, the only one of my project's dependencies that require boost is assimp. It bugged another developer enough that he changed our dependency install script to manually fetch and build assimp. :/

comment:7 Changed 9 years ago by mamoll (Mark Moll)

I have attached a patch to update to the latest version and add the boost variant. With this patch, you can install assimp like so:

port install assimp -boost

I am not quite ready to commit this. The new version causes some issues with the port ompl+app, which depends on assimp. Meshes are scaled to a fraction of their normal size. The assimp release notes are not very specific about what might have caused this.

Changed 9 years ago by mamoll (Mark Moll)

Attachment: Portfile.diff added

comment:8 in reply to:  7 ; Changed 9 years ago by drew@…

port install assimp -boost

This worked perfectly for me. Is it version 3.1.1 that caused the issue with ompl or the noboost variant? Assimp 3.0.1270 is also able to be built without boost, but ASSIMP_ENABLE_BOOST_WORKAROUND needs to be set true explicitly.

comment:9 in reply to:  8 Changed 9 years ago by mamoll (Mark Moll)

Replying to drew@…:

port install assimp -boost

This worked perfectly for me. Is it version 3.1.1 that caused the issue with ompl or the noboost variant? Assimp 3.0.1270 is also able to be built without boost, but ASSIMP_ENABLE_BOOST_WORKAROUND needs to be set true explicitly.

Yes. Specifically, version 3.1.1 seems to have some issues loading COLLADA files (or at least ones generated by Sketchup, a 3D modeling program). Would a boost variant for 3.0.1270 be ok, or do you need 3.1.1?

comment:10 Changed 9 years ago by drew@…

3.0.1270 is perfectly fine until a fully functioning version is released. Just wanted to give a heads up that, unlike 3.1.1, its cmake configuration won't automatically set the workaround flag if boost isn't found.

comment:11 Changed 9 years ago by mamoll (Mark Moll)

Resolution: wontfix
Status: newclosed

The boost workaround code in 3.0.1270 doesn't compile (at least not with Xcode 6 on Yosemite):

In file included from /opt/local/var/macports/build/_Users_mmoll_src_macports_dports_graphics_assimp/assimp/work/assimp--3.0.1270-source-only/code/IFCLoader.cpp:49:
/opt/local/var/macports/build/_Users_mmoll_src_macports_dports_graphics_assimp/assimp/work/assimp--3.0.1270-source-only/code/BoostWorkaround/boost/tuple/tuple.hpp:178:20: error: expected expression
                        return m.get<N>();
                                        ^

I give up.

comment:12 Changed 9 years ago by drew@…

Thank you for the valiant effort. I guess keep this in mind when 3.1 is stable.

Note: See TracTickets for help on using tickets.