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

libidn not found with Homebrew on Mac #129

Open
ondohotola opened this issue Dec 22, 2021 · 9 comments
Open

libidn not found with Homebrew on Mac #129

ondohotola opened this issue Dec 22, 2021 · 9 comments
Labels
T-Question Type: Incoming question
Milestone

Comments

@ondohotola
Copy link

I am unable get Zonemaster:LDNS to compile on iMac/MacPro x86_64 MOnterey 12.1 with CPAN updated to latest.

It does not find libidn, which is installed from Homebrew.

From what I see it's just something similar like --prefix-openssl which needs to be added to the Makefile.PL, even though I see this in /usr/local

lrwxr-xr-x  1 el  admin  40 Jul 25 23:02 include/idn-free.h -> ../Cellar/libidn/1.38/include/idn-free.h
lrwxr-xr-x  1 el  admin  39 Jul 25 23:02 include/idn-int.h -> ../Cellar/libidn/1.38/include/idn-int.h
lrwxr-xr-x  1 el  admin  38 Jul 21 17:49 include/idn2.h -> ../Cellar/libidn2/2.3.2/include/idn2.h
lrwxr-xr-x  1 el  admin  36 Jul 25 23:02 include/idna.h -> ../Cellar/libidn/1.38/include/idna.h
lrwxr-xr-x  1 el  admin  41 Jul 25 23:02 lib/libidn.12.dylib -> ../Cellar/libidn/1.38/lib/libidn.12.dylib
lrwxr-xr-x  1 el  admin  34 Jul 25 23:02 lib/libidn.a -> ../Cellar/libidn/1.38/lib/libidn.a
lrwxr-xr-x  1 el  admin  38 Jul 25 23:02 lib/libidn.dylib -> ../Cellar/libidn/1.38/lib/libidn.dylib
lrwxr-xr-x  1 el  admin  43 Jul 21 17:49 lib/libidn2.0.dylib -> ../Cellar/libidn2/2.3.2/lib/libidn2.0.dylib
lrwxr-xr-x  1 el  admin  37 Jul 21 17:49 lib/libidn2.a -> ../Cellar/libidn2/2.3.2/lib/libidn2.a
lrwxr-xr-x  1 el  admin  41 Jul 21 17:49 lib/libidn2.dylib -> ../Cellar/libidn2/2.3.2/lib/libidn2.dylib

Thanks, el

@ghost
Copy link

ghost commented Aug 24, 2022

Could you test the proposal in #152 to see if this solves your issue? (I don't have access to Mac).

@matsduf matsduf modified the milestones: v2022.2, v2023.1 Dec 20, 2022
@matsduf matsduf modified the milestones: v2023.1, v2023.2 Jun 26, 2023
@matsduf matsduf modified the milestones: v2023.2, v2024.1 Mar 19, 2024
@matsduf matsduf modified the milestones: v2024.1, v2024.2 Jul 3, 2024
@marc-vanderwal
Copy link
Contributor

@ondohotola Do you have any news on this issue? Have you had the chance to test the proposed fix?

@ondohotola
Copy link
Author

ondohotola commented Sep 6, 2024

Thank you.

On my M2 MacMini the following worked (your milage will vary, and if it squeals about missing Perl Modules, just install them with cpan):

cpan Zonemaster::LDNS (which fails but that's fine)

cd $HOME/.cpan/build/Zonemaster-LDNS-4.0.2-0
HB=$(brew --prefix)
OSV=$(openssl --version|awk '{print $2}')
perl Makefile.PL \
   --prefix-openssl=$HB/Cellar/openssl@3/$OSV \
   --libidn-inc=$HB/include \
   --libidn-lib=$HB//lib
make
make test
make install
cpan Zonemaster::Engine
cpan Zonemaster::CLI

zonemaster-cli --version then shows

Zonemaster-CLI version v7.0.0
Zonemaster-Engine version v6.0.0
Zonemaster-LDNS version 4.0.2
NL NetLabs LDNS version 1.8.3

and zonemaster-cli --level ERROR na

shows

Seconds Level    Message
======= ======== =======
  65.90 ERROR    It cannot be determined if the child zone is signed or not.

whereas the Web GUI shows no error

@matsduf
Copy link
Contributor

matsduf commented Sep 6, 2024

Can you run again with --show_testcase --level INFO?

@ondohotola
Copy link
Author

I'll email the output to you off line, as I don't want to post it her.

@ondohotola
Copy link
Author

ondohotola commented Sep 12, 2024

Just for the record Mats and I are indeed engaging off line :-)-O

@ondohotola
Copy link
Author

It compiles out of the box on the Intel Mac, which leads me to requesting that perhaps the configure step should look not only for /usr/local but also for /opt/homebrew or even better test for Homebrew installation

if [ "$(command -v brew)" ]; then
   HB=$(brew --prefix)
fi

and

OSV=$(openssl --version|awk '{print $2}')

and if it exist add $HB to the tests like I did above, ie something like

perl Makefile.PL \
   --prefix-openssl=$HB/Cellar/openssl@3/$OSV \
   --libidn-inc=$HB/include \
   --libidn-lib=$HB/lib

@marc-vanderwal
Copy link
Contributor

We might want to consider using pkg-config to discover potential locations of the required libraries. Using pkg-config is more likely to be portable across *nix platforms.

@ondohotola
Copy link
Author

That should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Question Type: Incoming question
Projects
None yet
Development

No branches or pull requests

3 participants