Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Boost version to use Filesystem v4 #265

Open
dimitre opened this issue Mar 14, 2023 · 4 comments
Open

Update Boost version to use Filesystem v4 #265

dimitre opened this issue Mar 14, 2023 · 4 comments

Comments

@dimitre
Copy link
Member

dimitre commented Mar 14, 2023

I've tried to update boost to latest (v1.81.0)
but I think maybe some .a changed names in the meantime
error

cp: stage/lib/libboost_system.a: No such file or directory

With this change we can use boost filesystem v4 which is much more similar to std::filesystem

Today for example of::filesystem::canonical throws error when using boost library and the file doesn't exist.
so when using try / catch we are dealing with unexpected behavior, because sometimes we have to solve canonical paths for non existent files, example: if we are creating a directory.

@ofTheo
Copy link
Member

ofTheo commented Mar 14, 2023

does the stage folder not exist? or just libboost_system.a
if stage/lib exists might be good to list the dir to see what is getting generated.

I often add a bunch of ls -la to see what is being output when debugging issues like this.

@dimitre
Copy link
Member Author

dimitre commented Mar 14, 2023

Yes, in fact I'm building locally so the files are already there.

libboost_atomic.a	
libboost_filesystem.a

maybe libboost_system is renamed libboost_atomic?
or maybe the build parameters changed and we have to update cmake invocation?

@ofTheo
Copy link
Member

ofTheo commented Mar 14, 2023

@dimitre it might be that it is not an included lib by default anymore.

on this line we aren't specifying it:
https://github.com/openframeworks/apothecary/blob/master/apothecary/formulas/boost/boost.sh#L46

But we are copying it:
https://github.com/openframeworks/apothecary/blob/master/apothecary/formulas/boost/boost.sh#L312

It might be safe to just do something like this for the copy phase:
cp stage/lib/*.a $1/lib/$TYPE/

@dimitre
Copy link
Member Author

dimitre commented Mar 14, 2023

Thank you ! I'll be testing this as a separate PR, so maybe this allows us to use this macro on ofConstants.h

#define BOOST_FILESYSTEM_VERSION 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants