Error installing postgresql with homebrew - postgresql

When I run brew install postgresql I get this as an error message:
Last 15 lines from /Users/admin/Library/Logs/Homebrew/icu4c/02.make:
./formatted_string_builder.h:227:9: note: subexpression not valid in a constant expression
U_ASSERT(category <= 0xf),
^
../common/uassert.h:35:26: note: expanded from macro 'U_ASSERT'
# define U_ASSERT(exp) void()
^
./formatted_string_builder.h:240:64: note: in call to 'Field(0, 1)'
constexpr FormattedStringBuilder::Field kGeneralNumericField = {UFIELD_CATEGORY_UNDEFINED, 1};
^
3 errors generated.
*** Failed compilation command follows: ----------------------------------------------------------
clang++ -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../common -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -Qunused-arguments -Wno-parentheses-equality -Wglobal-constructors -fvisibility=hidden -fno-common -c -MMD -MT numfmt.d numfmt.o numfmt.ao -o numfmt.ao numfmt.cpp
--- ( rebuild with "/Library/Developer/CommandLineTools/usr/bin/make VERBOSE=1 all" to show all parameters ) --------
make[1]: *** [numfmt.ao] Error 1
make: *** [all-recursive] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
icu4c 67.1 (make C++14 compatible) https://github.com/Homebrew/homebrew-core/pull/59540
Error: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.
I have tried brew update (I am already up to date), and the only issue brew doctor gives me is that there are unexpected header files.
I am using
OSX Yosemite 10.10.5
Homebrew 2.4.12

Related

Compiling psqlODBC on CENTOS 7 gives me errors in connection.c - undeclared identifiers

So i'm stuck again.
What I want to do: access a postgreSQL database via database link from Oracle (12.1 - yes, I know it's old ...).
Oracle is running on Centos 7.
Initially I did a
yum -y install postgresql-odbc
yum -y install unixODBC
and was able to access postgreSQL (running on another machine).
But it didn't work for UTF-8 data. Got a hint that this might be due to an old version of unixODBC so I decided to compile from source (as the centos package is rather old).
Compiling and installing unixODBC worked without a hassle:
wget http://www.unixodbc.org/unixODBC-2.3.11.tar.gz
tar xzf unixODBC-2.3.11.tar.gz
cd unixODBC-2.3.11/
./configure
make
make install
But compiling psqlODBC is where it's at:
yum install postgresql
yum install postgresql-devel
wget https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-13.02.0000.tar.gz
cd psqlodbc-13.02.0000/
./configure
make
...
Make gives me the following output:
[root#tukanbox psqlodbc-13.02.0000]# make
make all-am
make[1]: Entering directory `/root/psqlodbc-13.02.0000'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/usr/local/include -I/usr/include -I/usr/include/pgsql/internal -DUNICODE_SUPPORT -g -O2 -Wall -MT psqlodbcw_la-connection.lo -MD -MP -MF .deps/psqlodbcw_la-connection.Tpo -c -o psqlodbcw_la-connection.lo `test -f 'connection.c' || echo './'`connection.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/usr/local/include -I/usr/include -I/usr/include/pgsql/internal -DUNICODE_SUPPORT -g -O2 -Wall -MT psqlodbcw_la-connection.lo -MD -MP -MF .deps/psqlodbcw_la-connection.Tpo -c connection.c -fPIC -DPIC -o .libs/psqlodbcw_la-connection.o
connection.c: In function 'handle_pgres_error':
connection.c:900:45: error: 'PG_DIAG_SCHEMA_NAME' undeclared (first use in this function)
errschemaname = PQresultErrorField(pgres, PG_DIAG_SCHEMA_NAME);
^
connection.c:900:45: note: each undeclared identifier is reported only once for each function it appears in
connection.c:901:44: error: 'PG_DIAG_TABLE_NAME' undeclared (first use in this function)
errtablename = PQresultErrorField(pgres, PG_DIAG_TABLE_NAME);
^
connection.c:902:45: error: 'PG_DIAG_COLUMN_NAME' undeclared (first use in this function)
errcolumnname = PQresultErrorField(pgres, PG_DIAG_COLUMN_NAME);
^
connection.c:903:47: error: 'PG_DIAG_DATATYPE_NAME' undeclared (first use in this function)
errdatatypename = PQresultErrorField(pgres, PG_DIAG_DATATYPE_NAME);
^
make[1]: *** [psqlodbcw_la-connection.lo] Fehler 1
make[1]: Leaving directory `/root/psqlodbc-13.02.0000'
make: *** [all] Fehler 2
Wondering where to declare these undeclared idenifiers. What does it want to know here? How to solve it?
No answer to the problem of not being able to compile - but an answer to the original problem that the original packages didn't work for UTF8:
https://www.postgresql.org/message-id/OFA166DBFD.19742AF7-ONC1257B6A.005692E6-C1257B6A.0056F890#lladro.net
This has to be done in the database as sysdba:
select fds_class_name from HS_FDS_CLASS;
select * from hs_class_caps where upper(CAP_DESCRIPTION) like '%NCHAR%' and FDS_CLASS_NAME ='ODBC12.1.0.1.0_0017';
exec DBMS_HS.ALTER_CLASS_CAPS('ODBC12.1.0.1.0_0017' , 564, 'ODBC12.1.0.1.0_0017', 564,131071, NULL, NULL);

Error and Build Failed while setting up mediapipe on Raspberry Pi 4 (Raspbian OS 64 bit)

I am new to both Raspberry Pi and Mediapipe. I was following these steps: https://spyjetson.blogspot.com/2021/06/installing-mediapipecpu-mode-on.html
But on this step: root#raspberrypi:/usr/local/src/mediapipe# python3 setup.py bdist_wheel
I am getting error and build failed
Error is this:
ERROR: /usr/local/src/mediapipe/mediapipe/framework/stream_handler/BUILD:95:11: C++ compilation of rule '//mediapipe/framework/stream_handler:default_input_stream_handler' failed (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 55 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 55 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from <command-line>:
/usr/include/stdc-predef.h: In substitution of 'template<class _Functor, class, class> std::function<std::unique_ptr<mediapipe::InputStreamHandler>(std::shared_ptr<mediapipe::tool::TagMap>, mediapipe::CalculatorContextManager*, const mediapipe::MediaPipeOptions&, bool)>::function(_Functor) [with _Functor = <missing>; <template-parameter-1-2> = <missing>; <template-parameter-1-3> = <missing>]':
mediapipe/framework/stream_handler/default_input_stream_handler.cc:24:1: required from here
/usr/include/stdc-predef.h:32:94: internal compiler error: Segmentation fault
32 | whether the overall intent is to support these features; otherwise,
| ^
0x7fa3cab217 __libc_start_main
../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
Target //mediapipe/modules/face_detection:face_detection_short_range_cpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 853.907s, Critical Path: 792.14s
INFO: 990 processes: 130 internal, 860 linux-sandbox.
FAILED: Build did NOT complete successfully
In my case it was a GCC issue. I downgraded from 10 to 9 and it compiled.
sudo apt install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9

Install postgresql with Homebrew does not work

I tried to install PostgreSQL on my mac book with homebrew.
brew install postgresql
But I couldn't install it and got these error messages.
Does anyone know what is the solution for this issue?
./formatted_string_builder.h:227:9: note: subexpression not valid in a constant expression
U_ASSERT(category <= 0xf),
^
../common/uassert.h:35:26: note: expanded from macro 'U_ASSERT'
# define U_ASSERT(exp) void()
^
./formatted_string_builder.h:240:64: note: in call to 'Field(0, 1)'
constexpr FormattedStringBuilder::Field kGeneralNumericField = {UFIELD_CATEGORY_UNDEFINED, 1};
^
3 errors generated.
*** Failed compilation command follows: ----------------------------------------------------------
clang++ -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -DU_HAVE_STRING_VIEW=1 -I. -I../common -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -Qunused-arguments -Wno-parentheses-equality -Wglobal-constructors -fvisibility=hidden -fno-common -c -MMD -MT numfmt.d numfmt.o numfmt.ao -o numfmt.ao numfmt.cpp
--- ( rebuild with "/Library/Developer/CommandLineTools/usr/bin/make VERBOSE=1 all" to show all parameters ) --------
make[1]: *** [numfmt.ao] Error 1
make: *** [all-recursive] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
Error: You are using macOS 10.12.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.
You need icu4c, The currently the version of icu4c written in Homebrew's Fomula is 67.1, and macOS is required to be High Sierra (10.13) or higher.

Unable to compile / install Orange Data Mining on Raspberry Pi

I have been trying to compile and install Orange 2.7.8 on Raspberry Pi 2 but was unsuccessful. I tried compiling by hand and also used pip install orange as per suggestion from: How can I install python-Orange on ubuntu 12.10
The first warning I got this:
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -I/usr/lib/pymodules/python2.7/numpy/core/include -Isource/include -Isource/orange/liblinear -Isource/orange/ppp -Isource/orange/px -I/usr/include/python2.7 -c source/orange/basstat.cpp -o build/temp.linux-armv7l-2.7/source/orange/basstat.o -fPIC -w -DLINUX -DORANGE_EXPORTS
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
But it kept going without an error. Then when it started compiling with g++, it started getting an error on multiple definition of TOrangeVector. There are many errors like the lines below:
build/temp.linux-armv7l-2.7/source/orange/distance.o:(.data.rel.ro+0x6c): multiple definition of `typeinfo for TOrangeVector<GCPtr<TVariable>, true>'
build/temp.linux-armv7l-2.7/source/orange/basstat.o:(.data.rel.ro+0x6c): first defined here
build/temp.linux-armv7l-2.7/source/orange/distance.o: In function `TExamplesDistance::classDescription() const':
/home/pi/build/orange/source/orange/ppp/distance.ppp:17: multiple definition of `typeinfo for TOrangeVector<bool, false>'
In the end it got kicked out:
/home/pi/build/orange/source/orange/vectortemplates.hpp:1075: multiple definition of `typeinfo name for TOrangeVector<GCPtr<TOrangeVector<GCPtr<TVariable>, true> >, true>'
build/temp.linux-armv7l-2.7/source/orange/basstat.o:/home/pi/build/orange/source/orange/ppp/../basstat.hpp:8: first defined here
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
Any guide on how to tweak this to make it compiled would be appreciated.

unable to build binutils for my cross compiler

i am trying to build binutils 2.19.1 with mingw/msys using following commands:
export PREFIX=/usr/local/cross
export TARGET=i586-elf
cd /usr/src
mkdir build-binutils
cd /usr/src/build-binutils
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all
make install
and im getting following errors:
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binuti
ls-2.19.1/bfd -I. -D__USE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../..
/binutils-2.19.1/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-proto
types -Wno-format -Werror -g -O2 -D__USE_MINGW_ACCESS -c -o archive.lo ../../bin
utils-2.19.1/bfd/archive.c
./libtool: line 2258: cygpath: command not found
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19.1/bfd -I. -D__U
SE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../../binutils-2.19.1/bfd/../in
clude -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-format -Werror -g -
O2 -D__USE_MINGW_ACCESS -c "" -o archive.o
gcc.exe: error: : No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
make[3]: *** [archive.lo] Error 1
make[3]: Leaving directory `/usr/src/build-binutils/bfd'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/src/build-binutils/bfd'
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/usr/src/build-binutils'
make: *** [install] Error 2
/x.sh: line 8: ../gcc-4.5.0/configure: No such file or directory
make: *** No rule to make target `all-gcc'. Stop.
make: *** No rule to make target `install-gcc'. Stop.
i am getting the same error even for the diff binutils version,i have tried binutils-2.19.1, 2.22.0, 2.23.1
so what can be the problem ??
also my mingw's gcc compiler version is 4.6.2
i've also tried the command
make CFLAGS="-Os -w"
bt still the same problem persists
I'm getting a similar error ("cygpath: command not found"), but with newer versions. FWICT there is a line within binutils that assumes that Cygwin is present, although I didn't see any notes in the build instructions saying that Cygwin was required (I might have missed it, though).
I suppose the correct approach would be to install Cygwin, but I'm not sure if that will interfere with Mingw in other ways. It looks like binutils is just trying to use cygpath to convert between O/S path naming conventions, so I got around this problem by creating a little dummy cygpath shell script:
#options described at http://cygwin-lite.sourceforge.net/html/cygpath.html
#echo "MISSING CYGPATH"
if [ "x$1" == "x-w" ]
then
echo $2 #just echo path name back as-is
else
read -p "MISSING CYGPATH. PARAMS WERE: 1=$1 2=$2 3=$3 4=$4 5=$5"
fi
I placed this on the PATH so binutils could find it, instead of getting an error during the build. This script just echoes the path name back as-is (for the path renaming scenario), since Windows seems to be able to understand Unix-style paths anyways these days (and I was running on Windows). For anything else, this script will pause and display the first few command line parameters, to provide some hints as to what further functionality is needed.
HTH someone get a little farther