{"id":2788,"date":"2025-06-08T14:33:08","date_gmt":"2025-06-08T14:33:08","guid":{"rendered":"https:\/\/hauweele.net\/~gawen\/blog\/?p=2788"},"modified":"2025-06-08T14:33:08","modified_gmt":"2025-06-08T14:33:08","slug":"avoid-rebuilding-rust-for-freebsd-ports","status":"publish","type":"post","link":"https:\/\/hauweele.net\/~gawen\/blog\/?p=2788","title":{"rendered":"Avoid rebuilding rust for FreeBSD ports"},"content":{"rendered":"<p>Today I tried to rebuild a rust-based port on FreeBSD. It tried to build <em>lang\/rust<\/em> from scratch even though it was already installed. The problem was that the latest binary package for rust was <em>1.86.0<\/em> and the latest version in the ports was <em>1.87.0<\/em>. Digging in <\/em>\/usr\/ports\/Mk\/Uses\/cargo.mk<\/em> there is:<\/p>\n<pre>\r\nCARGO_BUILDDEP?=\u00b7\u00b7yes\r\n.  if ${CARGO_BUILDDEP:tl} == \"yes\"\r\nBUILD_DEPENDS+=\u00b7${RUST_DEFAULT}>=1.87.0:lang\/${RUST_DEFAULT}\r\n.  elif ${CARGO_BUILDDEP:tl} == \"any-version\"\r\nBUILD_DEPENDS+=\u00b7${RUST_DEFAULT}>=0:lang\/${RUST_DEFAULT}\r\n.  endif\r\n<\/pre>\n<p>That&#8217;s the bit actually enforcing the build dependency. But as you can see, it&#8217;s easy to bypass this dependency with <code>export CARGO_BUILDDEP=no<\/code>. Just ensure that you have rust installed either with rustup or from the packages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I tried to rebuild a rust-based port on FreeBSD. It tried to build lang\/rust from scratch even though it was already installed. The problem was that the latest binary package for rust was 1.86.0 and the latest version in &hellip; <a href=\"https:\/\/hauweele.net\/~gawen\/blog\/?p=2788\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[1173,389,1172,393,1171],"class_list":["post-2788","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-dependency","tag-freebsd","tag-override","tag-port","tag-rust"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2788"}],"version-history":[{"count":0,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2788\/revisions"}],"wp:attachment":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}