Hi, building the port with WITH_PIE makes it fail (error message tells "-pie unused" during compilation). Until this is fixed, the port should get PIE_UNSAFE=yes in the Makefile (this fixes the build for me). Bye, Alexander.
Created attachment 239623 [details] use CMake support WITH_PIE should be using https://cmake.org/cmake/help/latest/variable/CMAKE_POSITION_INDEPENDENT_CODE.html instead of *blindly* forcing LDFLAGS+=-pie.
Created attachment 239624 [details] use CMake support CMAKE_ON helper doesn't work from within Mk/
^Triage: Reset Assignee after ports b5c25e6c4b7b
The change makes sense overall and also fixes the problem with this specific port. I'd say let's get this in, but it probably would invalidate a lot of exp-run results in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272898 Thanks for working on this, Jan, please push this in.
> it probably would invalidate a lot of exp-run results If this fixes a general class of problem we can just request another exp-run in 272898 after it's in. (That said it looks like the biggest issues in the exp-run are caused by gfortran.)
Alexander, can you land this?
(In reply to Gleb Popov from comment #6) I assume you don't mean my initial workaround, but the CMake part of jbeich. Correct? If correct: I further assume this is not a request of blindly committing that sane-looking (I don't know enough about cmake to be sure, but it looks at least sane) patch, but about working with portmgr about an exp-run and so on. Correct? If my understanding is correct: yes, I can do that.
Yes, I was talking about Jan's patch, sorry. However, I don't think it requires an exp-run because PIE is turned off by default. It merely will improve the situation for the consecutive WITH_PIE=yes exp-run in future.
The patch fixes the PIE build of multimedia/cmrtlib, math/blas and math/lapack (those cmake ports which failed PIE build in my own poudriere runs). I assume this will fix a lot of the cmake-using ports. This also solves Bug 268985.
portmgr, is an PIE-enabled exp-run needed, or do you want to do one anyway, or can I commit this? For a validation see the comment above this one.