I am trying to compile on OS-X gfortran only with the following configuration:
./configure --prefix=${INSTALL_HERE} \
--enable-checking=release \
--disable-stage1-checking \
--enable-languages=fortran \
--disable-cloog-version-check \
--disable-isl-version-check \
--disable-libstdcxx \
--enable-lto \
--disable-nls \
--with-gmp="${GMP_DIR}" \
--with-mpc="${MPC_DIR}" \
--with-mpfr="${MPFR_DIR}" \
--with-cloog="${CLOOG_DIR}" \
--with-isl="${ISL_DIR}"
However the end result is that I have not only gfortran but the whole suite, i.e. C/C++ compilers. Why does it happen considering the fact that I have --enable-languages=fortran?!
I only need gfortran to complement clang on OS-X.
From the gcc-help list:
C & C++ are mandatory for the build procedure.
https://gcc.gnu.org/ml/gcc-help/2015-11/msg00052.html
Related
I have successful built the LLVM and Halide with Visual studio 2019 on windows platform.
I then tried to make some no_runtime objs and a halide_runtime obj and link them together.
./lesson_15_generate \
-g my_first_generator \
-f my_first_generator_basic \
-e object,c_header\
-o . \
target=x86-64-windows-no_runtime
./lesson_15_generate \
-g my_first_generator \
-f my_first_generator_sse41 \
-e object,c_header\
-o . \
target=host-x86-64-windows-sse41-no_runtime
./lesson_15_generate \
-g my_first_generator \
-f my_first_generator_avx \
-e object,c_header\
-o . \
target=host-x86-64-windows-avx-no_runtime
./lesson_15_generate \
-r halide_runtime_x86 \
-e object,c_header\
-o . \
target=x86-64-windows
The windows static library was linked as follows
prompt>link.exe /out:test.lib halide_runtime_x86.obj
my_first_generator_basic.obj my_first_generator_sse41.obj
my_first_generator_avx.obj
However, the system returned with the following error
Microsoft (R) Incremental Linker Version 14.26.28806.0
Copyright (C) Microsoft Corporation. All rights reserved.
LINK : fatal error LNK1561: entry point must be defined
Please, shed some light on how to build a static halide library on windows platform.
Problem solved by adding /lib to link.exe
prompt>link.exe /lib /out:test.lib halide_runtime_x86.obj
my_first_generator_basic.obj my_first_generator_sse41.obj
my_first_generator_avx.obj
add /lib to link.exe
prompt>link.exe /lib /out:test.lib halide_runtime_x86.obj
my_first_generator_basic.obj my_first_generator_sse41.obj
my_first_generator_avx.obj
Using this tutorial I tried to install GCC with OpenACC support but unfortunately when I tried execute 'make' after this command:
$GCC5ROOT/source/gcc/configure \
--prefix= \
--target=nvptx-none \
--enable-as-accelerator-for="$target" \
--enable-languages=c,c++,fortran,lto \
--enable-checking=yes,df,fold,rtl \
--disable-multilib \
--with-sysroot=/nvptx-none \
--with-build-sysroot=$GCC5ROOT/install/nvptx-none \
--with-build-time-tools=$GCC5ROOT/install/nvptx-none/bin \
--disable-sjlj-exceptions \
--enable-newlib-io-long-long \
CC='gcc -m64'\
CXX='g++ -m64'
the following error occurs:
checking for suffix of object files... configure: error: in
`/home/nikos/Desktop/openacc/build/gcc5-accel/nvptx-none/libgcc':
configure: error: cannot compute suffix of object files: cannot
compile
I have OSX 10.11.4, Xcode 7.3.1.
Using make -- calls gcc -- calls clang, I get this error where clang is looking for a file whose name is a space!
Make error 1: clang: error: no such file or directory: ' '.
That is a space!
I have no idea how to fix this. The makefile formatting is correct.
Here is the end of the output from make:
gcc -g -v -Wall -I/usr/local/include -I/opt/local/include -I/Users/m/BioPrep \
-o mod \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: error: no such file or directory: ' '
make: *** [mod] Error 1
======================= Here is the contents of the Makefile:
# This is Makefile with all graphics code removed so that a compilation of mod can proceed
# "MakefileA" has the graphics files present but commented (#) out
CC = gcc
CFLAGS = -g -v -Wall
INCL = -I/usr/local/include -I/opt/local/include -I/Users/prowat/BioPrep
LIBS = -L/usr/local/lib -L/opt/local/lib -lX11 -lforms
mod: model.o \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
../lsoda/liblsoda.a`
cd ../mshell; make objs`
cd ../choosedisp; make objs`
cd ../connectdisps; make objs`
$(CC) $(CFLAGS) $(INCL) \
-o mod \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
model.o \
-L../lsoda -llsoda \
$(LIBS) \
-lm
=====================
Please use proper formatting: for code blocks, indent by 4 spaces. The backticks are only used for fixed-width fonts inside normal text.
You may have looked for spaces, but you need to look again. Based on the output make has shown you versus your makefile, it's pretty clear that there is at least one space after the backslash at the end of this line:
../connectdisps/opwsock.o \
You can tell this because if there were no spaces after this backslash then it would be continuing to the next line and make whould show the rest of the compile line:
model.o \
-L../lsoda -llsoda \
$(LIBS) \
-lm
Since those lines are missing from the output make provided, you can be sure that there's something about the opwsock.o line which is preventing make from recognizing the backslash/newline at the end.
I am working on a ARM Cortex A15 and using GCC compile (actually integrating it with TI's SYS/BIOS using XDC tools...)
After I enable -ftlo flag, I am having a performance loss about %30, which is a significant value. I am doing simple benchmark tests like pi and prime number calculating and also system dependent procedural tests.
Below are my compile and link flags. Is this amount of downgrade possible without any errors? Is there a possible cause for this? From what I searched through the internet, I come across benchmarks that flto may not improve the performance but I didn't see such a performance loss...
# Compile options.
C_OPTS = -w\
-mcpu=cortex-a15 \
-mtune=cortex-a15 \
-mabi=aapcs \
-mapcs \
-mfpu=neon \
-mfloat-abi=hard \
-O3 \
-flto \
-fno-strict-aliasing \
-fno-delete-null-pointer-checks \
-fno-strict-overflow \
# Linker options.
L_OPTS = -nostartfiles \
-static \
-Wl,--gc-sections \
-Wl,-Map,$(BUILD_DIR)/$(NAME).map \
-mfloat-abi=hard \
-e wbcd_ep \
-flto \
-fuse-linker-plugin \
I have my ffmpeg confix. For example:
./configure \
--target-os=darwin \
--arch=armv7s \
--cc='xcrun -sdk iphoneos clang' \
--extra-cflags='-arch armv7s -mios-version-min=7.0' \
--extra-cxxflags='-arch armv7s -mios-version-min=7.0' \
--extra-ldflags='-arch armv7s -mios-version-min=7.0' \
--prefix=armv7s \
--enable-cross-compile \
--disable-doc \
--disable-shared \
--disable-everything \
--enable-static \
--enable-pic \
--disable-muxers \
--enable-muxer=flv \
--disable-demuxers \
--enable-demuxer=h264 \
--disable-parsers \
--enable-parser=h264 \
But in addition I need to use also other code from ffmpeg library like #include "libavcodec/golomb.h". How to add these particular sources to the config or where can I find which sources can I include with which config setting?