Implicit declaration of function is invalid error for Perl module install on macOS Monterey - macos

I'm trying to install the Text::Unaccent module for Perl (5.30.3) using cpan (1.64) on macOS Monterey 12.4 but I'm getting 12 warnings and 1 error:
Unaccent.xs:109:10: error: implicit declaration of function 'unac_debug_callback' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
unac_debug_callback(in, unac_debug_print, NULL);
My understanding is that this is some kind of missing header file? I've installed a few other Perl modules successfully, this is the first problem I've come across. I've installed xcode and the command line tools are installed and up to date.
An example of the warnings is:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE/perl.h:545:21: note: expanded from macro 'STMT_END'
# define STMT_END )
This is not a custom Perl build, its the default installation. Is there other package/library that I need to install to get passed this?
macOS Monteray 12.4 (Intel)
/usr/bin/cpan version 1.64 calling Getopt::Std::getopts (version 1.12 [paranoid]),
running under Perl version 5.30.3.
xcode-select version 2395

Related

error installing ruby old version 2.0.0-p247

I am trying to run command
rbenv install 2.0.0-p247
I tried to follow several steps by googling the errors that I faced but I am still not able to resolve the error
I got this error
BUILD FAILED (macOS 11.4 using ruby-build 20210804)
Inspect or clean up the working tree at /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.F4rCnt
Results logged to /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.log
Last 10 log lines:
compiling ancdata.c
compiling raddrinfo.c
installing default socket libraries
compiling constants.c
1 warning generated.
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
linking shared-object socket.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
make: *** [build-ext] Error 2
The log file mentioned above has content:
https://easyupload.io/gygw5y
Ruby 2.0.0 is very much past its end of life, so I'm assuming you have a specific reason you need install it. Otherwise, you are much better off installing a modern, supported version such as 2.7.x or 3.0.x.
Older versions of ruby were built with openssl#1.0. After 1.0 went end of life, ruby-build had a breaking change to require openssl#1.1. This means that ruby versions < 2.4 can no longer be installed/built directly using ruby-build (i.e., rbenv). This GitHub issue has details.
Homebrew has removed its openssl#1.0 formula, but you can still install it via an rbenv tap. The following might work for you, though the comments in the issue report mixed results depending on the version of Command Line Tools being used.
brew install rbenv/tap/openssl#1.0
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.0)" 2.0.0-p247
Note: if you are running on an M1 (Apple Silicon) Mac, you might be out of luck. AFIK, there's no intention of getting openssl#1.0 to to work on Apple Silicon.

How to install the xmlrpc client command on macOS

I need to install the xmlrpc command line client on my mac. I tried Macports and Homebrew but they don't install the xmlrpc command line function.
I guess that's because the default install of xmlrpc-c doesn't include the xmlrpc comman line tool :
Because the utility programs are not essential to the package, the
default install tools don't install them at all. The builder does
build them, though, and if you build Xmlrpc-c from source, you will
find them all in the tools/ directory.
But I need this tool, I tried to compible xmlrpc-c with
./configure --prefix=/usr/local/ && make && make install
But it threw errors like :
asprintf.c:132:10: error: implicit declaration of function 'vasprintf' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
So does someone did it on a mac ?
Thanks

Compile errors when setting up Plone development environment

I'm trying to follow the walkthrough here to produce a new theme for my Plone 5.1 server:
https://training.plone.org/5/theming/theme-package.html
I'm using MacOS 10.13.6 running clang clang-1000.11.45.5 (the one that comes with XCode) and Python 3.6.4 (installed through Anaconda). I've run into some trouble since the buildout script that is produced by mr.bob doesn't appear to contain all of the dependencies, specifically plone.recipe.zope2instance==4.2.22. When I attempt to install that dependency manually, I get the following compilation error:
src/Persistence/_Persistence.c:178:5: error: non-void function 'init_Persistence' should return a value [-Wreturn-type]
return;
^
17 warnings and 7 errors generated.
error: command 'clang' failed with exit status 1
I tried upgrading to the latest version of mr.bob and the templates, then using the plonecli to create and start the buildout, but I get the same compilation errors.
There are many like it in that module. How do I resolve this so I can finish installing that dependency and finish my buildout?
Try to use Python 2.7, it's better supported by Zope and Plone.
Plone is using Python 2.7.x until Version 5.1.
In Plone 5.2 you will have the option to run Plone under Python 3, but then you have to use the WSGI-Server instead of the ZServer. For now just use Plone 5.1 with Python 2.7 as Plone 5.2 is still not finally released.

Ruby compile failed while installing on Mountain Lion 10.8?

This is the command I entered in the terminal while following "Ruby on Rails development with Mac OS X Mountain Lion", and its result:
rbenv install 2.0.0-p247
Downloading openssl-1.0.1e.tar.gz...
-> https://www.openssl.org/source/openssl-1.0.1e.tar.gz
Installing openssl-1.0.1e...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/x8/19f_wwjx4gd26z6qdq874tj40000gs/T/ruby-build.20130919211135.42003
Results logged to /var/folders/x8/19f_wwjx4gd26z6qdq874tj40000gs/T/ruby- build.20130919211135.42003.log
Last 10 log lines:
RANLIB =true
ARFLAGS =
PERL =/usr/bin/perl
SIXTY_FOUR_BIT_LONG mode
DES_UNROLL used
DES_INT used
RC4 uses uchar
RC4_CHUNK is unsigned long
sh: make: command not found
/usr/local/bin/ruby-build: line 387: make: command not found
Please help!
/usr/local/bin/ruby-build: line 387: make: command not found means rbenv can't compile Ruby because the necessary tools aren't available.
Have you installed Xcode?
Have you installed its associated command-line applications? That's the second step needed, and is found inside the Xcode application.
Have you recently updated Xcode? If so, you might need to update the command-line tools too.

Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk

I'm trying to install rpy2 for Python3 with the following command:
easy_install-3.2 rpy2
This gives a few warnings and an error:
warning: no previously-included files matching '*patch*' found anywhere in distribution
warning: no previously-included files matching '*diff*' found anywhere in distribution
warning: no previously-included files matching '.hg' found anywhere in distribution
no previously-included directories found matching 'dist'
gcc-4.2 not found, using clang instead
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
build/python3_rpy/rpy/rinterface/_rinterface.c:51:10: fatal error: 'signal.h' file not found
#include <signal.h>
^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
The file /Developer/SDKs/MacOSX10.6.sdk seems to be missing even though I have xcode 4.5.1 installed.
There is no file called MacOSX10.6.sdk in the "Downloads for Apple Developers" on the Apple home page. What do I do?
Ps. It all works well if I do not specify python3.
What is happening is that python was built with a pre-4.3 version of Xcode where the tools and SDKs were installed in /Developer. This is no longer the case with Xcode 4.3 where the tools and SDKs are part of the Xcode.app bundle. It also looks like python was compiled using gcc rather than clang.
I would recommend dumping the installation of python3 you have and installing it via macports, which will use the latest Xcode to build its ports and will therefore be able to compile additional python modules.
Once you have installed macports, simply do:
$ sudo port install python33
There is also a good chance those python modules can be installed by simply doing:
$ sudo port install whizzopymod
EDIT: Scratch that last part as macports doesn't have rpy2 for python3. You'll have to continue using easy_install I guess.

Resources