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

Fix build on FreeBSD #1251

Merged
merged 1 commit into from
May 4, 2024
Merged

Fix build on FreeBSD #1251

merged 1 commit into from
May 4, 2024

Conversation

wahjava
Copy link
Contributor

@wahjava wahjava commented May 3, 2024

It's broken on FreeBSD 14.0-RELEASE:

FAILED: CMakeFiles/mold.dir/common/filepath.cc.o 
/usr/bin/c++ -DTBB_USE_DEBUG -DUSE_SYSTEM_MIMALLOC -Imold-2.31.0/third-party/blake3/c -I.build -pipe -g -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -pipe -g -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -std=gnu++20 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wall -Wextra -Wno-sign-compare -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers -ggnu-pubnames -D_GLIBCXX_ASSERTIONS -pthread -fpch-preprocess -MD -MT CMakeFiles/mold.dir/common/filepath.cc.o -MF CMakeFiles/mold.dir/common/filepath.cc.o.d -o CMakeFiles/mold.dir/common/filepath.cc.o -c mold-2.31.0/common/filepath.cc
mold-2.31.0/common/filepath.cc:47:12: error: use of undeclared identifier 'CTL_KERN'
  mib[0] = CTL_KERN;
           ^
mold-2.31.0/common/filepath.cc:48:12: error: use of undeclared identifier 'KERN_PROC'
  mib[1] = KERN_PROC;
           ^
mold-2.31.0/common/filepath.cc:49:12: error: use of undeclared identifier 'KERN_PROC_PATHNAME'
  mib[2] = KERN_PROC_PATHNAME;
           ^
mold-2.31.0/common/filepath.cc:53:3: error: use of undeclared identifier 'sysctl'
  sysctl(mib, 4, NULL, &size, NULL, 0);
  ^
mold-2.31.0/common/filepath.cc:57:3: error: use of undeclared identifier 'sysctl'
  sysctl(mib, 4, path.data(), &size, NULL, 0);
  ^
5 errors generated.

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request May 3, 2024
- Add a patch to fix building on FreeBSD, submitted upstream
  at rui314/mold#1251
@rui314 rui314 merged commit a3480e8 into rui314:main May 4, 2024
7 checks passed
@rui314
Copy link
Owner

rui314 commented May 4, 2024

Thanks!

@rui314
Copy link
Owner

rui314 commented May 4, 2024

@wahjava By the way, https://cgit.freebsd.org/ports/tree/devel/mold/Makefile says that mold is licensed under AGPLv3, which is no longer the case. Our license is MIT. Can you fix it as well?

@wahjava wahjava deleted the fix-on-freebsd branch May 4, 2024 12:37
@wahjava
Copy link
Contributor Author

wahjava commented May 4, 2024

@wahjava By the way, https://cgit.freebsd.org/ports/tree/devel/mold/Makefile says that mold is licensed under AGPLv3, which is no longer the case. Our license is MIT. Can you fix it as well?

My apologies. Fixed in freebsd/freebsd-ports@751037d and freebsd/freebsd-ports@b3834bb.

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

Successfully merging this pull request may close these issues.

None yet

2 participants