-
Notifications
You must be signed in to change notification settings - Fork 407
Description
Problem
When using libvroom as a dependency for other projects, building VROOM without -fPIC flag gives an error. With the -fpic or -fPIC flag, gcc creates an object file with position-independent code. This is usually necessary when creating a shared object.
Is it a good idea to add this flag to the makefile? Or are there some tradeoffs with using this flag, hence, the users must do this themselves depending on requirements?
To Reproduce
Building vrpRouting (pgRouting) with VROOM without the fPIC flag gives an error: https://github.com/krashish8/vrprouting/runs/4330973080?check_suite_focus=true#step:9:70
Adding this flag before building VROOM resolves this error:
https://github.com/krashish8/vrprouting/blob/c1839b715ef64d769a5b025a3d9c0e68e1633a9c/.github/workflows/ubuntu.yml#L65-L76
As of now, we were updating the makefile and adding this flag before building VROOM, as mentioned in the above GitHub Actions workflow file. We can continue doing this, so it's not a big issue, still any thoughts on this?