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

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.

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!

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.

Missing PostgreSQL libraries while compiling inside Cygwin

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.

ZMQ Compilation problems for C++ examples

I am trying to compile the ZMQ C++ source code examples provided at zmq.org (i.e. github.com/imatix/zguide.git). My OS is xubuntu and I installed ZMQ prerequisites which are libtool, autoconf, automake and uuid-dev package properly. I installed czmq as well. Compilation and linking of ZMQ itself was fine and libs are located properly under /usr/local/bin. Nevertheless, I am getting below compilation errors. Googling did not help much and I wonder if anyone knows a quick solution to these errors, which originates from the missing header file zmq.hpp. Thanks in advance.
$./build all
hwclient.cpp
hwclient.cpp:6:19: fatal error: zmq.hpp: No such file or directory
compilation terminated.
hwserver.cpp
hwserver.cpp:6:19: fatal error: zmq.hpp: No such file or directory
compilation terminated.
identity.cpp
identity.cpp:7:19: fatal error: zmq.hpp: No such file or directory
compilation terminated.
lbbroker.cpp
In file included from lbbroker.cpp:7:0:
zhelpers.hpp:29:19: fatal error: zmq.hpp: No such file or directory
compilation terminated.
lpclient.cpp
In file included from lpclient.cpp:6:0:
zhelpers.hpp:29:19: fatal error: zmq.hpp: No such file or directory
compilation terminated.
lpserver.cpp
In file included from lpserver.cpp:8:0:
zhelpers.hpp:29:19: fatal error: zmq.hpp: No such file or directory
compilation terminated.
mdbroker.cpp
In file included from zmsg.hpp:35:0,
from mdbroker.cpp:7:
zhelpers.hpp:29:19: fatal error: zmq.hpp: No such file or directory
compilation terminated.
mdclient.cpp
......
It looks zmq.hpp has been moved to another git repository beginning with ZMQ 3.2 which is available at https://github.com/zeromq/cppzmq. I have clonned this to same place where a previously extracted the ZMQ's tar ball. Then I created a symbolic link to zmq.hpp from the examples's C++ directory. Then examples compiled fine.
prem#~/Code/zeromq>ls
cppzmq-master.zip zguide zmqpp-develop zmqpp-develop.zip
prem#~/Code/zeromq>unzip cppzmq-master.zip
Archive: cppzmq-master.zip
235803740753312576495301ebf5b8ed76407173
creating: cppzmq-master/
inflating: cppzmq-master/LICENSE
inflating: cppzmq-master/README
inflating: cppzmq-master/zmq.hpp
prem#~/Code/zeromq>ls
cppzmq-master cppzmq-master.zip zguide zmqpp-develop zmqpp-develop.zip
prem#~/Code/zeromq>cd cppzmq-master/
prem#~/Code/zeromq/cppzmq-master>ls
prem#~/Code/zeromq/cppzmq-master>sudo cp zmq.hpp /usr/include/
prem#~/Code/zeromq/cppzmq-master>cd ~/Code/zeromq/zguide/examples/C++
prem#~/Code/zeromq/zguide/examples/C++>./build all
Building C++ examples...
hwclient.cpp
hwserver.cpp
identity.cpp
interrupt.cpp
...
prem#~/Code/zeromq/zguide/examples/C++>

Resources