Compile a fortran 77 file(MIAH.f77) gfortran - fortran

I am trying to compile a .f77 file. Here is the command:
gfortran MIAH.f77 -o test
but I am getting the message below:
/usr/bin/ld:MIAH.f77: file format not recognized; treating as linker script
/usr/bin/ld:MIAH.f77:1: syntax error
collect2: error: ld returned 1 exit status**
What does this mean?

Related

Why is there this dune build error? 'cannot find -lz'

I am trying to build a project with this dune file:
src/lib/precomputed_values/gen_values/dune:
(executable
(name gen_values)
(flags -w -32)
(libraries
;; opam libraries
stdio
async_kernel
compiler-libs
core_kernel
ppxlib
ppxlib.ast
ppxlib.astlib
async
core
ocaml-migrate-parsetree
base
ocaml-compiler-libs.common
async_unix
base.caml
sexplib0
;; local libraries
coda_runtime_config
consensus
transaction_snark
mina_state
snark_params
coda_genesis_proof
blockchain_snark
mina_base
global_signer_private_key
ppx_util
snarky.backendless
genesis_constants
pickles
test_genesis_ledger
coda_genesis_ledger
staged_ledger_diff
)
(preprocessor_deps ../../../config.mlh)
(preprocess
(pps ppx_version ppx_optcomp ppx_let ppxlib.metaquot ppx_here))
(instrumentation (backend bisect_ppx))
(modes native))
But am getting the error:
File "src/lib/precomputed_values/gen_values/dune", line 2, characters 7-17:
2 | (name gen_values)
^^^^^^^^^^
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking (exit code 1)
Makefile:84: recipe for target 'build' failed
make: *** [build] Error 1
Could anyone point me in the right direction?
Thanks :)
Do you have the libz available on your system ? it looks like the ld linker does not find it in its search path.
libz.a is a C library that implements C function for compressing/decompressing data. Such libraries come with your OS distribution independently of Ocaml.
Ocaml tooling provides way to use C library (via stub) using ld (the standard linker) that will link your ocaml stubs to the functions of libz.a . But if the required library is missing, you get the error you quoted.
-lz is saying to ld to link your application with the libz.a (or libz.so) library that is usually located in /usr/lib - if libz.a (libz.so) is not there, the linker will fail causing the emission of the following message :
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status

energia compilation error error _fini

I am using Energia with cc3200 TI Evaluation Board and I have added a wavelet library from this link but after editing the library source file and compiling it gives this error:
/compressed/energia-0101e0017-windows/energia-0101e0017/hardware/tools/lm4f/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m\libc.a(lib_a-fini.o): In function `__libc_fini_array':fini.c:(.text.__libc_fini_array+0x22): undefined reference to '_fini' collect2.exe: error: ld returned 1 exit status
I did some google search and could not find any solution. Any help is appreciated.

"ld" broken (downlevel?) on Linux

I've attempted to build g++ v5.1.0 on my Centos 6 system. The build seems to have worked, but when I try to compile and >link< a program, the linker fails thus:
[seesdev#sees15-lin ~]$ g++ -o testcpp testcpp.cpp
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
Do I have to get a newer version of "ld"? How?

Load PNG with SDLImage in Vala

RWops enemy_rwops = new RWops.from_file("img/enemy.png", "rb");
enemy = SDLImage.load_png(enemy_rwops);
I have that code to load a .png (enemy is a SDL_Surface). However, I get this error:
/tmp/ccGDtjkw.o: In function `':
main.vala.c:(.text+0x59): undefined reference to `IMG_LoadPNG_RW'
collect2: error: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
Those two lines are in my constructor, and I am, indeed "using SDLImage" and adding it in the "--pkg" compile line:
valac --pkg sdl --pkg sdl-gfx --pkg sdl-image -X -lSDL_gfx -o mission- main.vala
Any ideas?
valac --pkg sdl --pkg sdl-gfx --pkg sdl-image -X -lSDL_gfx -X -lSDL_image --Xcc=-I/usr/include/SDL -o game main.vala
Got it, just use that compile line.

DSSS error code 65280

I have a pomodoro timer that I am trying to compile using DSSS. It compiles when executing:
dmd pomodoro.d
However, when I execute
dsss build
From within the project directory, it complains:
pomodoro.d => pomodoro
WARNING: Module pomodoro.d does not have a module declaration. This can cause problems
with rebuild's -oq option. If an error occurs, fix this first.
/usr/bin/ld: cannot find -ltango
collect2: ld returned 1 exit status
--- errorlevel 1
Command /opt/dsss/bin/rebuild returned with code 65280, aborting.
Error: Command failed, aborting.
My dsss.conf file in the directory is:
name = pomodoro
[pomodoro.d]
target = pomodoro
The contents of /opt/dsss/etc/rebuild/default is
profile=dmd-posix-tango
I think the offending line is here(in dmd-posix-tango), but do not know what to do.
[link]
oneatatime=yes
cmd=dmd -L--start-group -L-ltango $i -of$o
This is on Arch Linux
Any ideas?
DSSS is no longer maintained. Consider using dub: http://code.dlang.org/