I'm using Netbeans 11 and MSYS2 MINGW64 G++.
Here's a screenshot of my toolchains:
When I try to run a simple Hello World c++ I get the following errors:
0 [main] cppapplication_2_cygwin_try (19728) D:\Program-Workspaces\netbean
s11\CppApplication_2_Cygwin_Try\dist\Debug\MinGW_2-Windows\cppapplication_2_cygw
in_try.exe: *** fatal error - cygheap base mismatch detected - 0x180343408/0x180
347408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
In other cases like when using the CLANG++ compiler, everything compiles well with the make.exe.
Could someone help on this please?
Thanks.
EDIT: Adding the NB11 messages:
cd 'D:\Program-Workspaces\netbeans11\CppApplication_2_Cygwin_Try'
D:\Programs\msys64\usr\bin\make.exe -f Makefile CONF=Debug
"/D/Programs/msys64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
"/D/Programs/msys64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_2-Windows/cppapplication_2_cygwin_try.exe
make[2]: Entering directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
mkdir -p build/Debug/MinGW_2-Windows
rm -f "build/Debug/MinGW_2-Windows/main.o.d"
g++ -std=c++2a -c -g -MMD -MP -MF "build/Debug/MinGW_2-Windows/main.o.d" -o build/Debug/MinGW_2-Windows/main.o main.cpp
mkdir -p dist/Debug/MinGW_2-Windows
g++ -std=c++2a -o dist/Debug/MinGW_2-Windows/cppapplication_2_cygwin_try build/Debug/MinGW_2-Windows/main.o
make[2]: Leaving directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
make[1]: Leaving directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
BUILD SUCCESSFUL (total time: 17s)
cd 'D:\Program-Workspaces\netbeans11\CppApplication_2_Cygwin_Try'
D:\Programs\msys64\usr\bin\make.exe -f Makefile CONF=Debug
"/D/Programs/msys64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
"/D/Programs/msys64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_2-Windows/cppapplication_2_cygwin_try.exe
make[2]: Entering directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
make[2]: 'dist/Debug/MinGW_2-Windows/cppapplication_2_cygwin_try.exe' is up to date.
make[2]: Leaving directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
make[1]: Leaving directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
BUILD SUCCESSFUL (total time: 3s)
0 [main] cppapplication_2_cygwin_try (17884) D:\Program-Workspaces\netbean
s11\CppApplication_2_Cygwin_Try\dist\Debug\MinGW_2-Windows\cppapplication_2_cygw
in_try.exe: *** fatal error - cygheap base mismatch detected - 0x180343408/0x180
347408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
RUN FAILED (exit value 127, total time: 1s)
Related
I'm trying to follow these instructions on Vultr for Ubuntu 20.04 to install memcached, however when I get to the step sudo make install, the output is:
make all-recursive
make[1]: Entering directory '/root/memcached-1.6.17'
Making all in doc
make[2]: Entering directory '/root/memcached-1.6.17/doc'
make all-am
make[3]: Entering directory '/root/memcached-1.6.17/doc'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Entering directory '/root/memcached-1.6.17'
make[2]: Leaving directory '/root/memcached-1.6.17'
make[1]: Leaving directory '/root/memcached-1.6.17'
root#plesk:~/memcached-1.6.17# ./memcached --version
memcached 1.6.17
root#plesk:~/memcached-1.6.17# sudo make install
make install-recursive
make[1]: Entering directory '/root/memcached-1.6.17'
Making install in doc
make[2]: Entering directory '/root/memcached-1.6.17/doc'
make install-am
make[3]: Entering directory '/root/memcached-1.6.17/doc'
make[4]: Entering directory '/root/memcached-1.6.17/doc'
make[4]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/usr/local/memcached/share/man/man1'
/usr/bin/install -c -m 644 memcached.1 '/usr/local/memcached/share/man/man1'
make[4]: Leaving directory '/root/memcached-1.6.17/doc'
make[3]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Entering directory '/root/memcached-1.6.17'
make[3]: Entering directory '/root/memcached-1.6.17'
/usr/bin/mkdir -p '/usr/local/memcached/bin'
/usr/bin/install -c memcached '/usr/local/memcached/bin'
/usr/bin/mkdir -p '/usr/local/memcached/include/memcached'
/usr/bin/install -c -m 644 protocol_binary.h xxhash.h '/usr/local/memcached/include/memcached'
make[3]: Leaving directory '/root/memcached-1.6.17'
make[2]: Leaving directory '/root/memcached-1.6.17'
make[1]: Leaving directory '/root/memcached-1.6.17'
And then attempting to start memcached with:
sudo systemctl start memcached
results in Failed to start memcached.service: Unit memcached.service not found.
What am I missing here?
(Also Vultr instructs "Test if Memcached is active and running on TCP port 11211" by running netstat -tulpn | grep :11211--when I first tried to do this, I had to install netstat, but running this command does nothing.)
Since you installed memcached from source, you will need to run the binary directly from the command line to start the service.
/usr/local/memcached/bin/memcached -d -m 64 -l 127.0.0.1 -p 11211
I am new to PostgreSQL. I am trying to install Postgres through source code. If I use some prebuilt binaries I am getting some dependency bugs. So I am using source code installation. While running the second step of Postgres installation i.e. make command I am getting these errors.
make[4]: *** [spgtextproc.o] Error 1
make[4]: Leaving directory `/usr/postgresql-9.5.10/src/backend/access/spgist'
make[3]: *** [spgist-recursive] Error 2
make[3]: Leaving directory `/usr/postgresql-9.5.10/src/backend/access'
make[2]: *** [access-recursive] Error 2
make[2]: Leaving directory `/usr/postgresql-9.5.10/src/backend'
make[1]: *** [all-backend-recurse] Error 2
make[1]: Leaving directory `/usr/postgresql-9.5.10/src'
make: *** [all-src-recurse] Error 2
Using sudo make install fixed the error for me
try these steps
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
While running the below command, I thought that src refers to the src directory(src) inside Postgres. And ran prefix to link it
./configure --prefix ~/postgres-12.0/src/
Here source refers to the directory where Postgres needs to be installed not the Postgres src directory.
Running the command like below solved it.
mkdir ~/any_directory
./configure --prefix ~/any_directory/
I'm trying to get Netbeans up and running so I can start a Fortran project. I've downloaded the binaries and installed the plugins to the best of my knowledge. When I try to compile my hello world I get this error:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/convection
mkdir -p build/Debug/GNU-MacOSX
gfortran -c -g -o build/Debug/GNU-MacOSX/main.o main.f
gfortran: error trying to exec 'f951': execvp: No such file or directory
make[2]: *** [build/Debug/GNU-MacOSX/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 111ms)
Any thoughts?
EDIT: I'm using Mac OSX 10.8.5
EDIT 2: I've been messing around for awhile now and now the error is slightly different:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/convection
mkdir -p build/Debug/GNU-MacOSX
gfortran -c -g -o build/Debug/GNU-MacOSX/main.o main.f
make[2]: gfortran: No such file or directory
make[2]: *** [build/Debug/GNU-MacOSX/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 127ms)
EDIT 3: And just for fun, here is the output from a successful build that I was able to do in Ubuntu:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/hannah/NetBeansProjects/test'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/test
make[2]: Entering directory `/home/hannah/NetBeansProjects/test'
make[2]: `dist/Debug/GNU-Linux-x86/test' is up to date.
make[2]: Leaving directory `/home/hannah/NetBeansProjects/test'
make[1]: Leaving directory `/home/hannah/NetBeansProjects/test'
BUILD SUCCESSFUL (total time: 92ms)
I had the same problem on 10.9. I needed to make a new gfortran link in my /usr/bin (Base directory). After that it worked fine. If I had it in usr/local/bin,..or any other path it didn't work.
Here is a link to someone else's solution to this problem. gfortran is unable to find f951.
http://ubuntuforums.org/showthread.php?t=1164394
I think I found the solution here: http://eftrunk.blogspot.com/2011/11/how-to-fix-error-trying-to-exec-f951.html
Will report back if it works or not.
I have optimised my ubuntu 13.04 running 64-bit machine to cross-compile for 32bit ARM and checked by developing c/c++ code the code is successfully running on 32bit ARM(BBBlack) NOW what I want to achieve is connectivity with the Xively server's updating and retrieving feeds/datapoints from datastreams.
So I'm thinking to utilise the c library from Xively to use in my Ubuntu eclipse development environment will it work?
Will there be any crosscompilation problem's? or Is it all fine?
The following is what I'm getting when I run >> make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc examples
make: *** src: No such file or directory. Stop.
nishant#Nishant-K53SC:~$ cd libxively
nishant#Nishant-K53SC:~/libxively$ make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc libxively
make: Entering directory `/home/nishant/libxively/src'
make -C libxively
make[1]: Entering directory `/home/nishant/libxively/src/libxively'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/nishant/libxively/src/libxively'
make: Leaving directory `/home/nishant/libxively/src'
nishant#Nishant-K53SC:~/libxively$ make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc libxively
make: Entering directory `/home/nishant/libxively/src'
make -C libxively
make[1]: Entering directory `/home/nishant/libxively/src/libxively'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/nishant/libxively/src/libxively'
make: Leaving directory `/home/nishant/libxively/src'
nishant#Nishant-K53SC:~/libxively$ make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc examples
make: Entering directory `/home/nishant/libxively/src'
make -C examples
make[1]: Entering directory `/home/nishant/libxively/src/examples'
for dir in datapoint_delete datapoint_delete_range datastream_create datastream_delete datastream_get datastream_update feed_get feed_update; do (make -C $dir) || exit 1; done
make[2]: Entering directory `/home/nishant/libxively/src/examples/datapoint_delete'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datapoint_delete'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datapoint_delete_range'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datapoint_delete_range'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datastream_create'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datastream_create'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datastream_delete'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datastream_delete'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datastream_get'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datastream_get'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datastream_update'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datastream_update'
make[2]: Entering directory `/home/nishant/libxively/src/examples/feed_get'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/feed_get'
make[2]: Entering directory `/home/nishant/libxively/src/examples/feed_update'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/feed_update'
make[1]: Leaving directory `/home/nishant/libxively/src/examples'
make: Leaving directory `/home/nishant/libxively/src'
UPDATES ERRORS WHILE BUILDING WITH LIBRARy:
Build of configuration Debug for project Test **
make all
Building file: ../src/Test.cpp
Invoking: GCC C++ Compiler
arm-linux-gnueabi-g++ -I/usr/arm-linux-gnueabi/include/c++/4.7.3 -I/home/nishant/libxively/src/libxively -I/usr/arm-linux-gnueabi/include/c++/4.7.3/bits -I/usr/arm-linux-gnueabi/include/c++/4.7.3/ext -I/usr/arm-linux-gnueabi/include/c++/4.7.3/arm-linux-gnueabi -I/usr/arm-linux-gnueabi/include/c++/4.7.3/backward -I/usr/arm-linux-gnueabi/include/c++/4.7.3/decimal -includexively.h -includexi_helpers.h -includexi_err.h -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Test.d" -MT"src/Test.d" -o "src/Test.o" "../src/Test.cpp"
/home/nishant/workspace/Test/src/libxively.a: could not read symbols: File format not recognized
Finished building: ../src/Test.cpp
collect2: error: ld returned 1 exit status
Building target: Test
make: *** [Test] Error 1
Invoking: GCC C++ Linker
arm-linux-gnueabi-g++ -L/home/nishant/workspace/Test/src -L/usr/arm-linux-gnueabi/lib -o "Test" ./src/Test.o -lxively
**** Build Finished ****
Xively C library should work on any 32-bit and 64-bit POSIX OS as well as various RTOS with lwIP.
To cross compile the library using arm-linux-eabi-gcc, you need to run the following command in the toplevel directory:
make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc libxively
make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc examples
Detailed instructions
Below I will describe how to compile a simple example C program and statically link it with Xively library. This should provide enough background information. Although, I cannot provide information on how to fix Eclipse IDE as I doubt it's possible.
Create a directory and clone the library:
mkdir hello_xively
cd hello_xively
git clone --recursive https://github.com/xively/libxively
Add the test.c file now as shown:
#include "xively.h"
int main() {
xi_context_t* ctx = xi_create_context( XI_HTTP, "DUMMY_API_KEY_STRING", 123 );
xi_delete_context( ctx );
return 0;
};
Build the library itself (please note that CC and AR values for your target may differ):
export CC=arm-linux-eabi-gcc # C compiler fron-end for the ARM Linux target
export AR=arm-linux-eabi-ar # This is needed for the build to work
export XI=`pwd`/libxively.a # To store the output in current direcory
make -C libxively/src libxively
Compile test.c and link it with the static library:
$CC test.c \
-I./libxively/src/libxively \
libxively.a -o xively_static_test
You now can try copying the xively_static_test executable to the target device's filesystem and execute it, which should produce no output as it's a test example. No you can extend the above example to provide functionality you desire!
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