veripool / verilog-perl

Verilog parser, preprocessor, and related tools for the Verilog-Perl package
https://www.veripool.org/verilog-perl
Artistic License 2.0
117 stars 33 forks source link

Install problem from CPAN with 5.26.3/darwin-thread-multi-2level #1428

Closed veripoolbot closed 5 years ago

veripoolbot commented 5 years ago

Author Name: Jack Langsdorf Original Redmine Issue: 1428 from https://www.veripool.org

Original Assignee: Jack Langsdorf


Installing Verilog::Netlist or Verilog::Parser (etc) from CPAN fail on my mac (Mojave 10.14, perl 5, version 26, subversion 3 (v5.26.3) built for darwin-thread-multi-2level Other modules from CPAN do not fail in the same way, I think there is an old Mac workaround in the Verilog module Makefiles that is causing a problem.

The failing message is: LD_RUN_PATH="/usr/lib" /usr/bin/clang -dynamiclib -lstdc++ -L/System/Library/Perl/5.26.3/darwin-thread-multi-2level/CORE -lperl -lgcc_eh -L/usr/local/lib VFileLine.o VParseLex.o VParse.o VParseBison.o VSymTable.o VAst.o -o ../blib/arch/auto/Verilog/Parser/Parser.bundle Parser_cleaned.o \ -lstdc++ \

ld: warning: directory not found for option '-L/System/Library/Perl/5.26.3/darwin-thread-multi-2level/CORE' ld: library not found for -lperl clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [../blib/arch/auto/Verilog/Parser/Parser.bundle] Error 1 make: [subdirs] Error 2 WSNYDER/Verilog-Perl-3.464.tar.gz /usr/bin/make -- NOT OK

I went to ~/.cpan/build/Verilog-Perl-3.464-*/

There are these suspicious lines in the Makefile.PL which I commented out:

if ($^V eq '5.12.4') {
    $out .= sprintf("LDDLFLAGS = -dynamiclib -lstdc++ -L/System/Library/Perl/5.12/%s/CORE -lperl -L/usr/local/lib\n",$Config{archname});
} elsif ($^V eq '5.18.2') {
    $out .= sprintf("LDDLFLAGS = -dynamiclib -lstdc++ -L/System/Library/Perl/5.18/%s/CORE -lperl -L/usr/local/lib\n",$Config{archname});
} else {
    $out .= sprintf("LDDLFLAGS = -dynamiclib -lstdc++ -L/System/Library/Perl/%vd/%s/CORE -lperl -lgcc_eh -L/usr/local/lib\n",$^V,$Config{archname});
}

and elsewhere this reference to PERL_INC: VFileLine.o: $(PPSRC)/VFileLine.cpp $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $<

When I commented out the lines with the sprintf and deleted the reference to PERL_INC (in multiple Makefile.PL files), I was able to pass make in the .cpan/build/Verilog* directory and install the modules manually. So I am not blocked, but future Mac OSX users will be.

veripoolbot commented 5 years ago

Original Redmine Comment Author Name: Wilson Snyder (@wsnyder) Original Date: 2019-05-01T21:13:19Z


Maybe Apple has finally properly built perl. Somehow I doubt it ;)

Can you please provide a patch that uses the version number (like the current hacks) to make it work on your system version (I don't want to break those on older versions), then I can upstream it. Thanks.

veripoolbot commented 5 years ago

Original Redmine Comment Author Name: Jack Langsdorf Original Date: 2019-05-04T16:25:06Z


This seems to work and should keep older systems using the old method. Makefile.PL is changed in three places. Verilog-Perl-3.464-0 was the original directory, Verilog-Perl-3.464-4 is one that can be installed.

diff Verilog-Perl-3.464-0/Makefile.PL Verilog-Perl-3.464-4/Makefile.PL
e36c36
<   } else {
---
>   } elsif ($^V < 'v5.26.3') {

diff Verilog-Perl-3.464-0/Preproc/Makefile.PL Verilog-Perl-3.464-4/Preproc/Makefile.PL
39c39
<   } else {
---
>   } elsif ($^V < 'v5.26.3') {

diff Verilog-Perl-3.464-0/Parser/Makefile.PL Verilog-Perl-3.464-4/Parser/Makefile.PL
39c39
<   } else {
---
>   } elsif ($^V < 'v5.26.3') {
veripoolbot commented 5 years ago

Original Redmine Comment Author Name: Wilson Snyder (@wsnyder) Original Date: 2019-05-05T02:01:02Z


Great, thanks, fixed in git and 3.466.