Compile Erlang OTP on Windows 10 - erlang

I have to build Erlang OTP on Windows as I am not able to use the prebuilt binaries. Does anyone have any help?
This is currently running in a Windows 10 virtual machine with Visual Studio 2013 update 5, Windows SDK 8.1 and Cygwin 3.0.7.
Running otp_build configure in cygwin:
$ ./otp_build configure
Copying static configure cache /cygdrive/c/src/otp/erts/autoconf/win64.config.cache.static to /cygdrive/c/src/otp/erts/autoconf/win64.config.cache
/cygdrive/c/src/otp/configure --build=x86_64-unknown-cygwin build_alias=win32 --host=win32 --target=win32 --disable-dynamic-ssl-lib --cache-file=/cygdrive/c/src/otp/erts/autoconf/win64.config.cache CC=cc\.sh CXX=cc\.sh RANLIB=true AR=ar\.sh
configure: loading cache /cygdrive/c/src/otp/erts/autoconf/win64.config.cache
checking for win32-gcc... (cached) cc.sh
checking whether the C compiler works... no
configure: error: in `/cygdrive/c/src/otp':
configure: error: C compiler cannot create executables
See `config.log' for more details
I getting this output in the config.log
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1948: loading cache /cygdrive/c/src/otp/erts/autoconf/win64.config.cache
configure:2272: checking for win32-gcc
configure:2299: result: cc.sh
configure:2568: checking for C compiler version
configure:2577: cc.sh --version >&5
LINK : warning LNK4044: unrecognized option '/-version'; ignored^M
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2588: $? = 157
configure:2577: cc.sh -v >&5
LINK : warning LNK4044: unrecognized option '/v'; ignored^M
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2588: $? = 157
configure:2577: cc.sh -V >&5
LINK : warning LNK4044: unrecognized option '/V'; ignored^M
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2588: $? = 157
configure:2577: cc.sh -qversion >&5
LINK : warning LNK4044: unrecognized option '/qversion'; ignored^M
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2588: $? = 157
configure:2608: checking whether the C compiler works
configure:2630: cc.sh conftest.c >&5
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2634: $? = 157
configure:2672: result: no
configure: failed program was:
| /* confdefs.h */
My LIB and LIBPATH
$ echo $LIB
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/amd64/:/home/sanfordjd/ProgramFile32/WindowsKits/8.1/Lib/winv6.3/um/x64:/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib:/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/amd64:/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/:/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/amd64
$ echo $LIBPATH
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/amd64/
$ locate msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/amd64/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/arm/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/amd64/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/arm/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/msvcrt.lib
/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/amd64/msvcrt.lib
/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/arm/msvcrt.lib
/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/msvcrt.lib

Related

How to build opencv samples

I am new to cmake though not to make. This question is different from Could not build OpenCV Android sample project since that other question is about a single project and this one is looking at the overall CMakeLists.txt.
Speaking of which: consider the CMakeLists.txt in ${OPENCVDIR}/samples :
I followed basic process for cmake:
cd "${OPENCVDIR}/samples"
mkdir build
cd build
cmake ..
But at the last step I have:
$ cmake ..
CMake Error at CMakeLists.txt:72 (find_package):
Could not find a package configuration file provided by "OpenCV" with any
of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/git/opencv/samples/CMakeFiles/CMakeOutput.log".
Line 72 has this: find_package(OpenCV REQUIRED PATHS "..")
I looked at the error log and it was not informative.
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
The CXX compiler identification is GNU, found in "/git/opencv/samples/CMakeFiles/3.13.4/CompilerIdCXX/a.out"
Determining if the C compiler works passed with the following output:
Change Dir: /git/opencv/samples/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_26f76/fast"
/usr/bin/make -f CMakeFiles/cmTC_26f76.dir/build.make CMakeFiles/cmTC_26f76.dir/build
make[1]: Entering directory '/git/opencv/samples/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_26f76.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_26f76.dir/testCCompiler.c.o -c /git/opencv/samples/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_26f76
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_26f76.dir/link.txt --verbose=1
/usr/bin/cc -rdynamic CMakeFiles/cmTC_26f76.dir/testCCompiler.c.o -o cmTC_26f76
make[1]: Leaving directory '/git/opencv/samples/CMakeFiles/CMakeTmp'
Detecting C compiler ABI info compiled with the following output:
"/git/opencv/samples/CMakeFiles/CMakeOutput.log" 706 lines, 48095 characters
Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers
Feature record: CXX_FEATURE:0cxx_delegating_constructors
Feature record: CXX_FEATURE:0cxx_deleted_functions
Feature record: CXX_FEATURE:0cxx_digit_separators
Feature record: CXX_FEATURE:0cxx_enum_forward_declarations
Feature record: CXX_FEATURE:0cxx_explicit_conversions
Feature record: CXX_FEATURE:0cxx_extended_friend_declar
etc ..
What is the correct way to build these examples - hopefully using the CMakeLists.txt already provided?
It seems the installation directory of OpenCV couldn't be found by cmake. Try to provide the value through the argument:
cmake -DCMAKE_PREFIX_PATH=/home/someone/src/opencv/install ..
Ff it works, you could define this in the top-level CMakeLitst.txt:
list(APPEND CMAKE_PREFIX_PATH /home/someone/src/opencv/install)
This should provide CMake the place where it should look to.
$ opencv_version
3.4.16
$ cd OpenCV/samples/
$ cmake -B build
$ cmake --build build
JPEG display
$ build/cpp/example_cpp_image data/lena.jpg
USB camera capture
$ build/cpp/example_cpp_videocapture_basic
$ build/cpp/example_cpp_videocapture_camera
Recognition by AI
$ build/tapi/example_tapi_hog

asm/socket.h: No such file or directory cross compiling Dart for Raspberry pi

I'm cross-compiling the Dart runtime using the instruction here.
I've installed all the dependencies as specified. I've also cloned the git repository with the necessary tool chain.
I'm running the runtime compilation with this command:
./tools/build.py -m release -a arm --toolchain=../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf runtime
The compilation starts with no problem then it stops with this error:
LINK(target) out/ReleaseXARM/libdart_dependency_helper.target
CXX(host) out/ReleaseXARM/obj.host/libdart_lib_withcore/runtime/vm/bootstrap.o
In file included from /usr/include/sys/socket.h:38:0,
from /usr/include/netinet/in.h:23,
from /usr/include/arpa/inet.h:22,
from runtime/platform/globals.h:56,
from runtime/platform/assert.h:16,
from runtime/vm/allocation.h:8,
from runtime/vm/bootstrap.h:9,
from runtime/vm/bootstrap.cc:5:
/usr/include/bits/socket.h:345:24: fatal error: asm/socket.h: No such file or directory
#include <asm/socket.h>
^
compilation terminated.
CXX(host) out/ReleaseXARM/obj.host/libdart_lib_withcore/gen/async_gen.o
In file included from /usr/include/sys/socket.h:38:0,
from /usr/include/netinet/in.h:23,
from /usr/include/arpa/inet.h:22,
from runtime/platform/globals.h:56,
from runtime/platform/assert.h:16,
from runtime/vm/allocation.h:8,
from runtime/vm/bootstrap.h:9,
from out/ReleaseXARM/obj/gen/async_gen.cc:5:
/usr/include/bits/socket.h:345:24: fatal error: asm/socket.h: No such file or directory
#include <asm/socket.h>
^
compilation terminated.
runtime/libdart_lib_withcore.host.mk:978: recipe for target 'out/ReleaseXARM/obj.host/libdart_lib_withcore/runtime/vm/bootstrap.o' failed
make: *** [out/ReleaseXARM/obj.host/libdart_lib_withcore/runtime/vm/bootstrap.o] Error 1
make: *** Waiting for unfinished jobs....
runtime/libdart_lib_withcore.host.mk:986: recipe for target 'out/ReleaseXARM/obj.host/libdart_lib_withcore/gen/async_gen.o' failed
make: *** [out/ReleaseXARM/obj.host/libdart_lib_withcore/gen/async_gen.o] Error 1
BUILD FAILED
Am I missing any dependency or package?
I hit the same problem. On my ubuntu 14.04 system /usr/include/asm didn't exist. It was called asm-generic instead. I sym-linked it and the build was able to continue.
cd /usr/include
sudo ln -s asm-generic/ asm
The build was able to continue after that.
This is probably because you're trying to build an application without some of the include paths correctly set, for example using a 32-bit gcc on a 64-bit platform.
To resolve:
sudo apt-get install gcc-multilib
I'm not sure why this happens, but sometimes /usr/include/asm gets deleted. My teammates who looked at their Ubuntu x86-64 workstations found that the asm symlink was:
0 lrwxrwxrwx 1 root root 20 May 22 2013 /usr/include/asm -> x86_64-linux-gnu/asm
And the command to recreate it is:
$ cd /usr/include
$ sudo ln -s x86_64-linux-gnu/asm asm
The files in /usr/include/asm-generic are sometimes, but not always, equivalent to the files in the x86-64 specific directory; so it's difficult to recommend symlinking it as a workaround.

Ada cross-compiler for iOS targets

tl;dr
How can I compile Ada source code to a static library file suitable for apps on iPad targets running iOS to link against? (GCC is not a requirement. Solutions using LLVM or others are also welcome!)
I have a large library of portable Ada code that I would like to use in an iPad/iOS project. My host OS is Mac OS X 10.9 (running GCC 4.8.1 installed at /opt/local with MacPorts). To do this, I'm trying to build a GCC ARM cross-compiler with Ada support.
I am able to build a working GCC and GNAT that creates ARM executables, but I can't seem to build or install the Ada standard library, which is required for building my Ada code
The source packages I'm using:
gcc-4.8.1
binutils-2.24
libiconv-1.14
gmp-5.1.3
mpc-1.0.2
mpfr-3.1.2
The GCC build configuration:
$ bin/arm-none-eabi-gcc -v --version
Using built-in specs.
COLLECT_GCC=bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/lto-wrapper
arm-none-eabi-gcc (GCC) 4.8.1
Copyright (C) 2013 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.
Target: arm-none-eabi
Configured with: /Users/ardnew/cross/src/gcc-4.8.1/configure --target=arm-none-eabi --prefix=/Users/ardnew/cross --with-cpu=cortex-a8 --enable-languages=c,ada --disable-multilib --enable-interwork --disable-threads --disable-shared --disable-nls --disable-lto --disable-libssp --disable-decimal-float --disable-libgomp --disable-libmudflap
Thread model: single
gcc version 4.8.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '--version' '-mcpu=cortex-a8'
/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/cc1 -quiet -v -D__USES_INITFINI__ help-dummy -quiet -dumpbase help-dummy -mcpu=cortex-a8 -auxbase help-dummy -version --version -o /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccrSSKFx.s
GNU C (GCC) version 4.8.1 (arm-none-eabi)
compiled by GNU C version 4.8.1, GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-v' '--version' '-mcpu=cortex-a8'
/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/as -mcpu=cortex-a8 -meabi=5 --version -o /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccZYvQLp.o /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccrSSKFx.s
GNU assembler (GNU Binutils) 2.24
Copyright 2013 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 later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-none-eabi'.
COMPILER_PATH=/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/:/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/:/Users/ardnew/cross/libexec/gcc/arm-none-eabi/:/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/:/Users/ardnew/cross/lib/gcc/arm-none-eabi/:/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/
LIBRARY_PATH=/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/:/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/lib/
COLLECT_GCC_OPTIONS='-v' '--version' '-mcpu=cortex-a8'
/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/collect2 -X --version /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crti.o /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtbegin.o crt0.o -L/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1 -L/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/lib /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccZYvQLp.o --start-group -lgcc -lc --end-group /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtend.o /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtn.o
collect2 version 4.8.1
/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld -X --version /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crti.o /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtbegin.o crt0.o -L/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1 -L/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/lib /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccZYvQLp.o --start-group -lgcc -lc --end-group /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtend.o /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtn.o
GNU ld (GNU Binutils) 2.24
Copyright 2013 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) a later version.
This program has absolutely no warranty.
Test program to ensure its building ARM binaries:
$ cat told_unit1.adb told_unit1.ads
--
-- FILE: told_unit1.adb
--
with Ada.Text_IO;
use Ada.Text_IO;
package body told_unit1 is
procedure hello is
begin
put_line("hello, world");
end hello;
function double(x : in float) return float is
begin
return x + x;
end double;
end told_unit1;
--
-- FILE: told_unit1.ads
--
package told_unit1 is
procedure hello;
pragma Export
(
convention => C,
entity => hello,
external_name => "ada_hello"
);
function double(x : in float) return float;
pragma Export
(
convention => C,
entity => double,
external_name => "ada_double"
);
end told_unit1;
Then compiling the Ada code and inspecting it with file:
$ arm-none-eabi-gcc -c told_unit1.adb
$ file told_unit1.o
told_unit1.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
And then when I try to bind the library object file it pukes:
$ arm-none-eabi-gnatbind -aO$ADA_OBJECT_PATH -Ltold told_unit1
error: "a-textio.ali" not found, "a-textio.adb" must be compiled
Going back to my GCC build logs, I found that libada (which I believe is part of GNAT) wasn't ever built. When I try to run make all-target-libada from the GCC build directory, it eventually tells me:
Configuring in arm-none-eabi/libada
configure: loading cache ./config.cache
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... arm-none-eabi
checking target system type... arm-none-eabi
checking for arm-none-eabi-gcc... /Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/xgcc -B/Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/ -B/Users/ardnew/cross/arm-none-eabi/bin/ -B/Users/ardnew/cross/arm-none-eabi/lib/ -isystem /Users/ardnew/cross/arm-none-eabi/include -isystem /Users/ardnew/cross/arm-none-eabi/sys-include
checking for C compiler default output file name...
configure: error: in `/Users/ardnew/cross/src/gcc-4.8.1-obj/arm-none-eabi/libada':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [configure-target-libada] Error 1
And so I go inspect that config.log its referring to and find the following:
configure:2351: $? = 0
configure:2340: /Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/xgcc -B/Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/ -B/Users/ardnew/cross/arm-none-eabi/bin/ -B/Users/ardnew/cross/arm-none-eabi/lib/ -isystem /Users/ardnew/cross/arm-none-eabi/include -isystem /Users/ardnew/cross/arm-none-eabi/sys-include -v >&5
COLLECT_LTO_WRAPPER=/Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/lto-wrapper
Target: arm-none-eabi
Configured with: /Users/ardnew/cross/src/gcc-4.8.1/configure --target=arm-none-eabi --prefix=/Users/ardnew/cross --with-cpu=cortex-a8 --enable-languages=c,ada --disable-multilib --enable-interwork --disable-threads --disable-shared --disable-nls --disable-lto --disable-libssp --disable-decimal-float --disable-libgomp --disable-libmudflap
configure:2351: $? = 0
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:2351: $? = 1
configure:2371: checking for C compiler default output file name
configure:2393: /Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/xgcc -B/Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/ -B/Users/ardnew/cross/arm-none-eabi/bin/ -B/Users/ardnew/cross/arm-none-eabi/lib/ -isystem /Users/ardnew/cross/arm-none-eabi/include -isystem /Users/ardnew/cross/arm-none-eabi/sys-include -g -O2 conftest.c >&5
/Users/ardnew/cross/arm-none-eabi/bin/ld: cannot find crt0.o: No such file or directory
/Users/ardnew/cross/arm-none-eabi/bin/ld: cannot find -lg
/Users/ardnew/cross/arm-none-eabi/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
configure:2397: $? = 1
configure:2434: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2440: error: in `/Users/ardnew/cross/src/gcc-4.8.1-obj/arm-none-eabi/libada':
configure:2444: error: C compiler cannot create executables
See `config.log' for more details.
So at this point I'm way over my head and not really sure what to do next. It looks like I'm missing a C runtime library for ARM maybe?
Any help configuring GNAT/libada for ARM targets would be great.
Alternatively- is there a simpler way to link against Ada libraries from an Xcode iOS project?
Unfortunately, the answer is that there is no auto-magic tool to accomplish this. You can use tooling to validate the translations after the fact, but what you want isn't available yet.
I've had to deal with this same question in the past. A different answer would have dramatically changed one of my project's budgets, too. Perhaps someday.
Though I admit, I think there are ultimately enough incompatibilities that your source would need to be drastically altered - reducing the value of what you are looking to achieve here. In the end, the new investment is a bummer but will result in better source, if you can afford it.

Port -v self update can't find cc

MBP (10.7.3) Xcode 4.3.1 works, it compiles a c program.
ran sudo port -v selfupdate
BELOW is part of the console.log
configure:2735: result: i386-apple-darwin11.3.0
configure:2763: checking MacPorts version
configure:2766: result: 2.0.4
configure:2799: checking for sw_vers
configure:2817: found /usr/bin/sw_vers
configure:2829: result: /usr/bin/sw_vers
configure:2839: checking for defaults
configure:2857: found /usr/bin/defaults
configure:2869: result: /usr/bin/defaults
configure:2879: checking for xcode-select
configure:2897: found /usr/bin/xcode-select
configure:2909: result: /usr/bin/xcode-select
configure:2919: checking Mac OS X version
configure:2922: result: 10.7.3
configure:2945: checking Xcode location
configure:2948: result: /Applications/Xcode.app/Contents/Developer
configure:3036: checking for gcc
configure:3063: result: /usr/bin/cc
configure:3292: checking for C compiler version
configure:3301: /usr/bin/cc --version >&5
./configure: line 3303: /usr/bin/cc: No such file or directory
configure:3312: $? = 127
configure:3301: /usr/bin/cc -v >&5
./configure: line 3303: /usr/bin/cc: No such file or directory
configure:3312: $? = 127
configure:3301: /usr/bin/cc -V >&5
./configure: line 3303: /usr/bin/cc: No such file or directory
configure:3312: $? = 127
configure:3301: /usr/bin/cc -qversion >&5
./configure: line 3303: /usr/bin/cc: No such file or directory
configure:3312: $? = 127
configure:3332: checking whether the C compiler works
configure:3354: /usr/bin/cc conftest.c >&5
./configure: line 3356: /usr/bin/cc: No such file or directory
configure:3358: $? = 127
configure:3396: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "MacPorts"
| #define PACKAGE_TARNAME "macports"
| #define PACKAGE_VERSION "2.0.4"
| #define PACKAGE_STRING "MacPorts 2.0.4"
| #define PACKAGE_BUGREPORT "macports-dev#lists.macosforge.org"
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3401: error: in `/opt/local/var/macports/sources/rsync.macports.org/release/base':
configure:3403: error: C compiler cannot create executables
See `config.log' for more details
What do I need to do? Xcode is linked to the C compiler and port knows the Xcode location.
Any help greatly appreciated.
Xcode doesn't install all the command line tools by default, and even if you've installed them in the past, you may find that they're missing after an Xcode upgrade.
In Xcode, go to Preferences -> Downloads and make sure "Command Line Tools" is installed. It's an extra 115MB download.

I can't make SQSH 2.1.7 with freetds 0.91

I am having trouble building sqsh against freetds. This post cross-references with https://sourceforge.net/projects/sqsh/forums/forum/365924/topic/4716627.
I've installed Freetds 0.91 from sunfreeware.com on Solaris 10. I've confirmed the installation as noted in Chapter 9 of the user guide.
Following the sqsh notes from sqsh.org, I've set the SYBASE environment variable to /usr/local/freetds and run the configure script. (I do not have Sybase installed on this machine. I shouldn't need it.)
SYBASE=/usr/local/freetds; export SYBASE
./configure --with-readline
I've checked the Makefile, it seems to be right given what I've read.
SYBASE_LIBS = -lct -ltds -lnsl -ldl -lm
When I run make, I get(after building a bunch of stuff):
make
...
...[build output]...
...
gcc -L/usr/local/freetds/lib -L/usr/local/lib cmd_alias.o cmd_bcp.o cmd_buf.o cmd_connect.o cmd_do.o cmd_echo.o cmd_exit.o cmd_for.o cmd_func.o cmd_go.o cmd_help.o cmd_history.o cmd_if.o cmd_input.o cmd_jobs.o cmd_kill.o cmd_lock.o cmd_loop.o cmd_misc.o cmd_read.o cmd_reconnect.o cmd_redraw.o cmd_reset.o cmd_return.o cmd_rpc.o cmd_set.o cmd_shell.o cmd_show.o cmd_sleep.o cmd_wait.o cmd_warranty.o cmd_while.o var_ctlib.o var_date.o var_debug.o var_dsp.o var_hist.o var_misc.o var_passwd.o var_readline.o var_thresh.o dsp.o dsp_bcp.o dsp_csv.o dsp_conv.o dsp_desc.o dsp_horiz.o dsp_html.o dsp_meta.o dsp_none.o dsp_out.o dsp_pretty.o dsp_vert.o dsp_x.o sqsh_alias.o sqsh_args.o sqsh_avl.o sqsh_buf.o sqsh_cmd.o sqsh_compat.o sqsh_ctx.o sqsh_debug.o sqsh_env.o sqsh_error.o sqsh_expand.o sqsh_fd.o sqsh_filter.o sqsh_fork.o sqsh_func.o sqsh_getopt.o sqsh_global.o sqsh_history.o sqsh_init.o sqsh_job.o sqsh_readline.o sqsh_sig.o sqsh_sigcld.o sqsh_stdin.o sqsh_strchr.o sqsh_tok.o sqsh_varbuf.o sqsh_main.o -lct -ltds -lnsl -ldl -lm -lreadline -lcurses -o sqsh
ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/freetds/lib/libct.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/freetds/lib/libct.so value=LOCL);
ld: fatal: file /usr/local/freetds/lib/libtds.a: unknown file type
ld: fatal: File processing errors. No output written to sqsh
collect2: ld returned 1 exit status
make[1]: *** [sqsh] Error 1
make[1]: Leaving directory `/opt/BFMIfiles/src/sqsh-2.1.7/src'
make: *** [build-subdirs] Error 2
Is the error related to this: http://www.freetds.org/faq.html#where.is.libtds.so?
Any ideas?
Reference on freetds mailing list.
Reference on sqsh help forum.
When editing src/Makefile, get rid of -ltds (as suggested here) and change -ldl to -liconv. I got that last bit from the cygwin version of the sqsh README.
I used SYBASE=/usr/local/freetds/.
After that I had to set the LD_LIBRARY_PATH=$SYBASE/lib/:/usr/local/lib/ to get the freetds and liconv libraries.
Big thanks to the freetds mailing list. http://lists.ibiblio.org/pipermail/freetds/2011q3/027382.html

Resources