Missing PostgreSQL libraries while compiling inside Cygwin - windows

I'm trying to compile osm2pgsql inside Cygwin on a Windows7 machine.
While running configure script I'm getting following error message:
checking for PostgreSQL libraries... ./configure: line 17889: /cygdrive/c/Program: No such file or directory
./configure: line 17890: /cygdrive/c/Program: No such file or directory
./configure: line 17891: /cygdrive/c/Program: No such file or directory
./configure: line 17894: /cygdrive/c/Program: No such file or directory
./configure: line 17900: /cygdrive/c/Program: No such file or directory
configure: error: postgresql client library not found
Solution should be adding library folder location to PATH system variable, or have copy of libraries in location of PostgreSQL executables.
Location of PostgreSQL executables is
C:\Program Files (x86)\PostgreSQL\9.1\bin
and libraries location is
c:\Program Files (x86)\PostgreSQL\9.1\lib
both of them are included in PATH system variable (Windows7), but libraries are claimed missing anyway.
Copying libraries into ...\bin directory did not help either.
How should I proceed?

Run ./configure --help to see is there is a parameter like --with-<PostgreSQL>=/path/to/PostgreSQL where you can include the files you already have in C:\Program Files (x86)\PostgreSQL\9.1. If so run ./configure --with-<PostgreSQL>=/path/to/PostgreSQL.

Related

CGO build failing due to missing system libraries

I have a fairly simple issue: I am using CGO w/ GCC to build a project that depends on a package that binds to C (llvm-go). As a result of this, there are several libraries that this library needs to build that appear to be default Windows system libraries. Here is the error output:
gcc.exe: error: psapi.lib: No such file or directory
gcc.exe: error: shell32.lib: No such file or directory
gcc.exe: error: ole32.lib: No such file or directory
gcc.exe: error: uuid.lib: No such file or directory
gcc.exe: error: advapi32.lib: No such file or directory
gcc.exe: error: z.lib: No such file or directory
gcc.exe: error: libxml2.lib: No such file or directory
LLVM provides a tool that generates the link and include options for CGO for me. They are fairly numerous so pasting them here would be unwise.
I am using TDM GCC for Windows 10 with Go 1.16.
I don't know if there is an additional linker flag I need to add/remove to fix this issue. Let me know if you need any additional information. Thanks!

I can't run boot0.s file using gcc command

I'm a total newbie in Ubuntu & Assembly Language. Recently one of the lab tasks asks me to compile .s file in Ubuntu to see what the output shows & explain them later. My teacher has also provided me some commands to compile and object linking with boot0.S file. But whenever I try to run this following command, I get several errors.
Building boot0: Compilation
$ gcc ‐MD ‐fno‐builtin ‐nostdinc ‐fno‐stack‐protector ‐Os ‐g ‐m32 ‐I. ‐c ‐o boot0.o boot0.S
It's giving me errors like these:
gazzali#ubuntu:~/OS Lab Task/OS-challenging-IUTCSE16/Project 0/boot/boot0$ gcc ‐MD ‐fno‐builtin ‐nostdinc ‐fno‐stack‐protector ‐Os ‐g ‐m32 ‐I. ‐c ‐o boot0.o boot0.S
gcc: error: ‐MD: No such file or directory
gcc: error: ‐fno‐builtin: No such file or directory
gcc: error: ‐nostdinc: No such file or directory
gcc: error: ‐fno‐stack‐protector: No such file or directory
gcc: error: ‐Os: No such file or directory
gcc: error: ‐g: No such file or directory
gcc: error: ‐m32: No such file or directory
gcc: error: ‐I.: No such file or directory
gcc: error: ‐c: No such file or directory
gcc: error: ‐o: No such file or directory
gcc: error: boot0.o: No such file or directory
I'm currently running Ubuntu 18.04 LTS on VMWare on Windows 10. I will also provide boot0.S file if needed. Can you please help to find a way to run this assembly file? There are more 2 assembly files which I need to run via similar commands.
Thanks in Advance.

Lua 5.1.5's Makefile Produces Errors for Me

If I try to run the Makefile that comes with the source of Lua 5.1.5, I get the following errors:
gcc: error: #: No such file or directory
gcc: error: DLL: No such file or directory
gcc: error: needs: No such file or directory
gcc: error: all: No such file or directory
gcc: error: object: No such file or directory
gcc: error: files: No such file or directory
What do these errors mean? I would try fixing this issue myself before asking this question, but I don't know how to interpret these errors. If more context is needed, here is the full output.
This is a bug recorded here.
Just edit Makefile and remove # DLL needs all object files.

g++ error libboost on centos 7

I am trying to install the program my_mead_2.3.4 on my CentOS system.
I run
./configure --prefix=`pwd` --boostdir=/usr
and then make where I get these errors:
g++: error: /usr/lib64/lib/libboost_regex.a: No such file or directory
g++: error: /usr/lib64/lib/libboost_filesystem.a: No such file or directory
g++: error: /usr/lib64/lib/libboost_system.a: No such file or directory
g++: error: /usr/lib64/lib/libboost_serialization.a: No such file or directory
I ran yum install boost-devel, but still these files are missing.
I am new to Linux and CentOS, could you please tell me what to do here? Let me know if I should provide any additional Info.
Edit: apparently the program appends /lib to my boostdir. I don't know if this comes from the configure or the make step.

Strawberry Perl cannot install Mason templates

Hi cannot install mason templates on Strawberry Perl on windows 10 x64.
I've installed strawberry-perl-5.24.1.1-64bit.msi
CPAN works normally.
Any help would be great.
Guard installation fails:
C:\Strawberry\Echo>cpanm Mason
--> Working on Mason
Fetching http://www.cpan.org/authors/id/J/JS/JSWARTZ/Mason-2.24.tar.gz ... OK
Configuring Mason-2.24 ... OK
==> Found dependencies: Guard
--> Working on Guard
Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/Guard-1.023.tar.gz ... OK
Configuring Guard-1.023 ... OK
Building and testing Guard-1.023 ... FAIL
! Installing Guard failed. See C:\Users\DRASKO~1.POP\.cpanm\work\1485557949.7836\build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'Guard' is not installed
! Bailing out the installation for Mason-2.24.
C:\Strawberry\Echo>cpanm --verbose Guard
cpanm (App::cpanminus) 1.7042 on perl 5.024001 built for MSWin32-x64-multi-thread
Work directory is C:\Users\DRASKO~1.POP/.cpanm/work/1485557107.8988
You have make C:\Strawberry\c\bin\dmake.exe
You have LWP 6.15
Falling back to Archive::Tar 2.24
You have C:\FPC\3.0.0\bin\i386-Win32\unzip.exe
Searching Guard () on cpanmetadb ...
--> Working on Guard
Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/Guard-1.023.tar.gz ... OK
Unpacking Guard-1.023.tar.gz
Entering Guard-1.023
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.24)
Running Makefile.PL
Configuring Guard-1.023 ... Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Guard
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.24)
Building and testing Guard-1.023 ... cp Guard.pm blib\lib\Guard.pm
Running Mkbootstrap for Guard ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "Guard.bs"
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Guard.bs blib\arch\auto\Guard\Guard.bs 644
"C:\Strawberry\perl\bin\perl.exe" "C:\Strawberry\perl\lib\ExtUtils\xsubpp" -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap Guard.xs > Guard.xsc
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- Guard.xsc Guard.c
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.023\" -DXS_VERSION=\"1.023\" "-IC:\STRAWB~1\perl\lib\CORE" Guard.c
In file included from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\perl.h:689: sys\types.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:707: stdarg.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:718: ctype.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:729: locale.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:764: setjmp.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:785: stdlib.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:923: stddef.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:936: string.h: No such file or directory
In file included from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\perl.h:1084: sys\stat.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:1113: time.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:1134: errno.h: No such file or directory
In file included from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\perl.h:1789: limits.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:1792: float.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:1811: limits.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:1814: float.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:1843: limits.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\perl.h:2434: limits.h: No such file or directory
In file included from C:\STRAWB~1\perl\lib\CORE\perl.h:2684,
from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\handy.h:77: stdbool.h: No such file or directory
In file included from C:\STRAWB~1\perl\lib\CORE\perl.h:2795,
from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\dosish.h:110: signal.h: No such file or directory
In file included from C:\STRAWB~1\perl\lib\CORE\win32thread.h:4,
from C:\STRAWB~1\perl\lib\CORE\perl.h:3159,
from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\win32.h:131: windows.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\win32.h:159: io.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\win32.h:160: process.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\win32.h:161: stdio.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\win32.h:162: direct.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\win32.h:163: stdlib.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\win32.h:164: stddef.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\win32.h:165: fcntl.h: No such file or directory
In file included from C:\STRAWB~1\perl\lib\CORE\win32.h:426,
from C:\STRAWB~1\perl\lib\CORE\win32thread.h:4,
from C:\STRAWB~1\perl\lib\CORE\perl.h:3159,
from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\sys\socket.h:13: windows.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\sys\socket.h:21: winsock2.h: No such file or directory
C:\STRAWB~1\perl\lib\CORE\sys\socket.h:30: ws2tcpip.h: No such file or directory
In file included from C:\STRAWB~1\perl\lib\CORE\sys\socket.h:184,
from C:\STRAWB~1\perl\lib\CORE\win32.h:426,
from C:\STRAWB~1\perl\lib\CORE\win32thread.h:4,
from C:\STRAWB~1\perl\lib\CORE\perl.h:3159,
from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\sys\errno2.h:10: winsock2.h: No such file or directory
In file included from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\perl.h:3648: assert.h: No such file or directory
In file included from C:\STRAWB~1\perl\lib\CORE\iperlsys.h:51,
from C:\STRAWB~1\perl\lib\CORE\perl.h:3856,
from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\perlio.h:41: stdio.h: No such file or directory
In file included from C:\STRAWB~1\perl\lib\CORE\perl.h:3856,
from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\iperlsys.h:920: setjmp.h: No such file or directory
In file included from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\perl.h:4449: math.h: No such file or directory
In file included from C:\STRAWB~1\perl\lib\CORE\perl.h:5576,
from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\win32iop.h:16: sys\utime.h: No such file or directory
In file included from Guard.xs:4:
C:\STRAWB~1\perl\lib\CORE\perl.h:6526: fcntl.h: No such file or directory
dmake.exe: Error code 129, while making 'Guard.o'
FAIL
! Installing Guard failed. See C:\Users\DRASKO~1.POP\.cpanm\work\1
485557107.8988\build.log for details. Retry with --force to force install it.
I've just changed the path order for Strawberry in Edit environment variable. As noted in this thread

Resources