Compiling linux source to windows 7 w/ makefile.in - linux

I have the source for a linux-based program, but trying to run in Win7 environment. I found software called "mingw32" and msys that can compile linux source to win7 using makefile.in (included with source). But I get error "nothing to be done for 'makefile.in'"
Source is available here: http://sourceforge.net/projects/libots/files/libots/ots-0.5.0/ots-0.5.0.tar.gz/download
Makefile.in is below
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
[...]
POPT_LIBS = #POPT_LIBS#
POPT_REQUIRED = #POPT_REQUIRED#
RANLIB = #RANLIB#
RC = #RC#
STRIP = #STRIP#
VERSION = #VERSION#
VERSION_INFO = #VERSION_INFO#
[...]
lib_LTLIBRARIES = libots-1.la
[...]
libots-1.la: $(libots_1_la_OBJECTS) $(libots_1_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libots_1_la_LDFLAGS) $(libots_1_la_OBJECTS) $(libots_1_la_LIBADD) $(LIBS)
[...]
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

You need msys to run ./configure
Call msys.bat
cd to your e.g. c:\msys\1.0\src\ots-0.5.0 folder
run ./configure
you need also popt-1.5 . So if you don't have it , you have to download and build it first.
It's not that easy to build with mingw .
I would suggest first of all, download , the binary version for windows. If it runs without problems on your system, you can try to build it yourself. Ots-0.4.2-Win32-binary.zip
I doubt that this binary version works without error.
If you have time (3 days will not be enough)
you can download popt-1.8-1-src.zip .
But you must have also see line : configure:20043: checking for glib-2.0 >= 2.0 libxml-2.0 >= 2.4.23
and more.

Related

meson can not find windows resource compiler on linux

I'm trying to cross compile an application with meson 0.51.1
My build system: Linux
Host System: Windows
The application depends on freetype2 from meson wrap db:
https://wrapdb.mesonbuild.com/v1/projects/freetype2/2.9.1/1/get_wrap
I'm keep getting the following error:
meson.build: ERROR: Could not find Windows resource compiler
The complaint is about the following line in the freetype's meson.build file:
winmod = import('windows')
base_sources += [
'builds/windows/ftdebug.c',
winmod.compile_resources('src/base/ftver.rc'),
]
My cross file looks like:
[binaries]
c = ['ccache', 'i686-w64-mingw32-gcc']
cpp = ['ccache', 'i686-w64-mingw32-g++']
ar = 'i686-w64-mingw32-ar'
strip = 'i686-w64-mingw32-strip'
exe_wrapper = 'WINEPREFIX=~/.wine64 wine'
windres = 'i686-w64-mingw32-windres'
[properties]
needs_exe_wrapper = true
[host_machine]
system = 'windows'
cpu_family = 'i686'
cpu = 'i686'
endian = 'little'
i686-w64-mingw32-windres is installed:
$ i686-w64-mingw32-windres --version
GNU windres (GNU Binutils) 2.32.51.20190707
Copyright (C) 2019 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
I tried to set the WINDRES variable as described hear https://mesonbuild.com/Windows-module.html. It does not help either.

Make file problems when compiling TBB with MinGW for Windows

As the title says, I am attempting to compile TBB (2018_1 Version) with MingW (5.3.0) for windows. I generate and execute tbbvars.bat for the environment variables and then call make. Which yields the following errors:
MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
Error makefile 21: Command syntax error
Error makefile 26: Colon expected
But I have not moified the included make file, which looks like this:
tbb_root?=.
include $(tbb_root)/build/common.inc
.PHONY: default all tbb tbbmalloc tbbproxy test examples ##line 21
#workaround for non-depend targets tbb and tbbmalloc which both depend on version_string.ver
#According to documentation, recursively invoked make commands can process their targets in parallel
.NOTPARALLEL: tbb tbbmalloc tbbproxy
default: tbb tbbmalloc $(if $(use_proxy),tbbproxy) ##line 27
For building TBB from sources try next guidance:
Open mingw command line (or source environment from mingw's bat file)
change directory to unpacked_tbb/src
execute make tbb tbbmalloc stdver=c++11 compiler=gcc
You should use tbbvars.bat only for development purposes(e.g. add library to the PATH environment or add path to headers)
In case of issues please provide a full log
The problem is in your make utility:
MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
For building TBB, you should use GNU Make 3.81 or later.

How do I install gcc 6.x on Oracle Solaris 11.2 x86 and CentOS 6.6 Final?

I tried to install... but failed
$ wget https://ftp.gnu.org/gnu/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2
$ tar -jxvf gcc-6.2.0.tar.bz2
$ cd /home/logvadmin/gcc-6.2.0/
$ ./contrib/download_prerequisites
$ ./configure --prefix=/usr/gcc-6.2.0 --enable-languages=c,c++ --disable-multilib
$ make
In phase 6 Error
[Solaris]
make: Fatal error in reader: Makefile, line 27: Unexpected end of line seen
$ vi Makefile
26: ifeq (,$(.VARIABLES)) # The variable .VARIABLES, new with 3.80, is never empty.
27: $(error GNU make version 3.80 or newer is required.)
28: endif
user#solaris:~/gcc-6.2.0$ gcc --version
gcc (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[CentOS]
It takes too long to build.
6 hour ??
I dont know what the problem is..
As the comments point out, use gmake.
For full details, see https://gcc.gnu.org/install/index.html
I fairly regularly build GCC from SVN head on Solaris 11.3 amd64, Fedora 24 x64 and FreeBSD 11 x64.
Firstly, I built and installed libgmp, lbmpc and libmpfr to ~/tools/lib. You may not need to do this if you are using a recent Linux or FreeBSB. On Solaris, third party freeware is often many years out of data.
My configure script for Solaris is:
#!/bin/ksh93
export LD_RUN_PATH=/export/home/paulf/tools/lib/lib
../configure --prefix=/export/home/paulf/tools/gcc --with-gmp=/export/home/paulf/tools/lib --with-gnu-as --with-as=/usr/ccs/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld
My update & build script is:
#!/bin/ksh
export LD_RUN_PATH=~/tools/lib/lib
cd ~/scratch/gcc
svn up
cd build
gmake -j 4
if (( $? == 0 )) ; then
print gmake succeeded
gmake install
fi
Note that if you don't set the run path then the default GCC build won't set it and you will have an essentially broken compiler that needs LD_LIBRARY_PATH

cuda, gcc incompatible, downgrade [duplicate]

I am new to Cuda, and I am trying to compile this simple test_1.cu file:
#include <stdio.h>
__global__ void kernel(void)
{
}
int main (void)
{
kernel<<<1,1>>>();
printf( "Hello, World!\n");
return 0;
}
using this: nvcc test_1.cu
The output I get is:
In file included from /usr/local/cuda/bin/../include/cuda_runtime.h:59:0,
from <command-line>:0:
/usr/local/cuda/bin/../include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.5 and up are not supported!
my gcc --version:
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
How can I install a second version of gcc (4.4 -) along with 4.6 without messing everything up?
I found this old topic:
CUDA incompatible with my gcc version
the answer was:
gcc 4.5 and 4.6 are not supported with CUDA - code won't compile and
the rest of the toolchain, including cuda-gdb, won't work properly.
You cannot use them, and the restriction is non-negotiable.
Your only solution is to install a gcc 4.4 version as a second
compiler (most distributions will allow that). There is an option to
nvcc --compiler-bindir which can be used to point to an alternative
compiler. Create a local directory and the make symbolic links to the
supported gcc version executables. Pass that local directory to nvcc
via the --compiler-bindir option, and you should be able to compile
CUDA code without effecting the rest of your system.
But I have no idea how to do it
In my case I didn't have root rights, so I couldn't fully replace the current gcc (4.7) with the older version 4.4 (which I think would be a bad alternative). Although I did have rights where CUDA was installed. My solution was to create an extra folder (e.g. /somepath/gccfornvcc/), wherever I had rights, then to create a link to an nvcc accepted compiler. I already had gcc 4.4 available (but you can install it, without removing your current version).
ln -s [path to gcc 4.4]/gcc-4.4 /somepath/gccfornvcc/gcc
Then, in the same folder where the nvcc binary lives, you should find a file called nvcc.profile . There you just need to add the following line:
compiler-bindir = /somepath/gccfornvcc
And that will make nvcc use the proper compiler. This helps keeping the system in a proper state, keeping the newest compiler, but nvcc (only nvcc) will use the old compiler version.
Doing some research online shows several methods for accomplishing this task. I just tested the method found here: http://www.vectorfabrics.com/blog/item/cuda_4.0_on_ubuntu_11.04 and it worked like a charm for me. It steps you through installing gcc 4.4 and creating scripts to run that version with nvcc. If you prefer trying the method mentioned in your post I'd recommend following that first link to install gcc4.4 and then create symbolic links as mentioned in your post. Creating symbolic links in Linux is accomplished by using the 'ln' command.
For example:
ln -s [source file/folder path] [linkpath]
This link gives a few examples of creating symbolic links on both Ubuntu and Windows: http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/. Hopefully that points you in the right direction.
I guess you may try the new, beta, version, that based on LLVM.
Another way to make nvcc work with non-default compiler (unlike #Sluml's answer, it allows more flexibility):
At first, just like #Slump proposed, you need to create directory ~/local/gcc-4.4/, and then create there symlinks for right versions of gcc: for i in gcc gxx; do ln -s /usr/bin/${i}-4.4 ~/local/cudagcc/${i}; done. Now when you run nvcc -ccbin ~/local/gcc-4.4/ ... nvcc will use correct versions of gcc.
Here is small CMake snippet of forcing nvcc use specific host compiler.
option (CUDA_ENFORCE_HOST_COMPILER "Force nvcc to use the same compiler used to compile .c(pp) files insted of gcc/g++" OFF)
if (${CUDA_ENFORCE_HOST_COMPILER})
set (CMAKE_GCC_TEMP_DIR "CMakeGCC")
file(MAKE_DIRECTORY ${CMAKE_GCC_TEMP_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_C_COMPILER} ${CMAKE_GCC_TEMP_DIR}/gcc)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CXX_COMPILER} ${CMAKE_GCC_TEMP_DIR}/g++)
set(CUDA_NVCC_FLAGS -ccbin ${CMAKE_GCC_TEMP_DIR} ${CUDA_NVCC_FLAGS})
endif()
Referenceļ¼š
I update my gcc from 4.4 to 4.6. Then I could not use nvcc to compile my code. Luckily, by using the method provided by the following link. I set my default gcc compiler back to gcc 4.4. Now, I could compile file using either gcc4.4 or gcc4.6. quit cool
http://ubuntuguide.net/how-to-install-and-setup-gcc-4-1g4-1-in-ubuntu-10-0410-10

Cuda compiler not working with GCC 4.5 +

I am new to Cuda, and I am trying to compile this simple test_1.cu file:
#include <stdio.h>
__global__ void kernel(void)
{
}
int main (void)
{
kernel<<<1,1>>>();
printf( "Hello, World!\n");
return 0;
}
using this: nvcc test_1.cu
The output I get is:
In file included from /usr/local/cuda/bin/../include/cuda_runtime.h:59:0,
from <command-line>:0:
/usr/local/cuda/bin/../include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.5 and up are not supported!
my gcc --version:
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
How can I install a second version of gcc (4.4 -) along with 4.6 without messing everything up?
I found this old topic:
CUDA incompatible with my gcc version
the answer was:
gcc 4.5 and 4.6 are not supported with CUDA - code won't compile and
the rest of the toolchain, including cuda-gdb, won't work properly.
You cannot use them, and the restriction is non-negotiable.
Your only solution is to install a gcc 4.4 version as a second
compiler (most distributions will allow that). There is an option to
nvcc --compiler-bindir which can be used to point to an alternative
compiler. Create a local directory and the make symbolic links to the
supported gcc version executables. Pass that local directory to nvcc
via the --compiler-bindir option, and you should be able to compile
CUDA code without effecting the rest of your system.
But I have no idea how to do it
In my case I didn't have root rights, so I couldn't fully replace the current gcc (4.7) with the older version 4.4 (which I think would be a bad alternative). Although I did have rights where CUDA was installed. My solution was to create an extra folder (e.g. /somepath/gccfornvcc/), wherever I had rights, then to create a link to an nvcc accepted compiler. I already had gcc 4.4 available (but you can install it, without removing your current version).
ln -s [path to gcc 4.4]/gcc-4.4 /somepath/gccfornvcc/gcc
Then, in the same folder where the nvcc binary lives, you should find a file called nvcc.profile . There you just need to add the following line:
compiler-bindir = /somepath/gccfornvcc
And that will make nvcc use the proper compiler. This helps keeping the system in a proper state, keeping the newest compiler, but nvcc (only nvcc) will use the old compiler version.
Doing some research online shows several methods for accomplishing this task. I just tested the method found here: http://www.vectorfabrics.com/blog/item/cuda_4.0_on_ubuntu_11.04 and it worked like a charm for me. It steps you through installing gcc 4.4 and creating scripts to run that version with nvcc. If you prefer trying the method mentioned in your post I'd recommend following that first link to install gcc4.4 and then create symbolic links as mentioned in your post. Creating symbolic links in Linux is accomplished by using the 'ln' command.
For example:
ln -s [source file/folder path] [linkpath]
This link gives a few examples of creating symbolic links on both Ubuntu and Windows: http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/. Hopefully that points you in the right direction.
I guess you may try the new, beta, version, that based on LLVM.
Another way to make nvcc work with non-default compiler (unlike #Sluml's answer, it allows more flexibility):
At first, just like #Slump proposed, you need to create directory ~/local/gcc-4.4/, and then create there symlinks for right versions of gcc: for i in gcc gxx; do ln -s /usr/bin/${i}-4.4 ~/local/cudagcc/${i}; done. Now when you run nvcc -ccbin ~/local/gcc-4.4/ ... nvcc will use correct versions of gcc.
Here is small CMake snippet of forcing nvcc use specific host compiler.
option (CUDA_ENFORCE_HOST_COMPILER "Force nvcc to use the same compiler used to compile .c(pp) files insted of gcc/g++" OFF)
if (${CUDA_ENFORCE_HOST_COMPILER})
set (CMAKE_GCC_TEMP_DIR "CMakeGCC")
file(MAKE_DIRECTORY ${CMAKE_GCC_TEMP_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_C_COMPILER} ${CMAKE_GCC_TEMP_DIR}/gcc)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CXX_COMPILER} ${CMAKE_GCC_TEMP_DIR}/g++)
set(CUDA_NVCC_FLAGS -ccbin ${CMAKE_GCC_TEMP_DIR} ${CUDA_NVCC_FLAGS})
endif()
Referenceļ¼š
I update my gcc from 4.4 to 4.6. Then I could not use nvcc to compile my code. Luckily, by using the method provided by the following link. I set my default gcc compiler back to gcc 4.4. Now, I could compile file using either gcc4.4 or gcc4.6. quit cool
http://ubuntuguide.net/how-to-install-and-setup-gcc-4-1g4-1-in-ubuntu-10-0410-10

Resources