mason icon indicating copy to clipboard operation
mason copied to clipboard

Boost libs: cflags + ldflags should be empty

Open kkaefer opened this issue 10 years ago • 2 comments

The compiled boost libs are static libs, so the user should use static_libs to obtain the paths. However, calling cflags and ldflags on them currently either fails, or returns -lboost_*, which may cause failure since it doesn't specify the path to the library also.

We should mass-apply this patch to all compiled boost libs:

diff --git a/script.sh b/script.sh
index b2eb041..e5562b2 100755
--- a/script.sh
+++ b/script.sh
@@ -58,8 +58,12 @@ function mason_compile {
     mv stage/${MASON_LIB_FILE} ${MASON_PREFIX}/${MASON_LIB_FILE}
 }

+function mason_cflags {
+    : # Use the boost headers package
+}
+
 function mason_ldflags {
-    echo "-lboost_${BOOST_LIBRARY}"
+    : # We're only using the full path to the archive, which is output in static_libs
 }

 function mason_clean {

kkaefer avatar May 12 '15 14:05 kkaefer

@kkaefer current thoughts on this? It looks like this was never changed: we still provide output for both static_libs and ldflags for boost (and probably a lot of other packages). This is harmless as long as the client prefers the static_libs output, correct?

springmeyer avatar Mar 07 '17 00:03 springmeyer

In most packages, we manually return an empty string for ldflags. In some cases, e.g. GLFW, we're manually removing the library link flag, while retaining link flags for third party/system libraries.

kkaefer avatar Mar 08 '17 21:03 kkaefer