Undefined Reference to "Main" When Building OS - makefile

I'm just working on a tiny simple OS, but I'm getting an error thrown at me. When I try to build I get this error:
joseph#joseph-linuxmint ~/Desktop/os $ make test
g++ lib/screen.cpp -o lib/screen
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'lib/screen' failed
make: *** [lib/screen] Error 1
Source code is hosted on github here: https://github.com/HackingNewbie/JoeOSmakefile

Related

ERROR:relocation R_X86_64_PC32 against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC

I am getting a make error while running omnetpp.
I have turned the clang and the lld off. The exact error is:
Creating shared library: /home/ash/omnetpp-master/out/gcc-release/src/sim/liboppsim.so
/usr/bin/ld: /usr/local/lib/libpython3.10.a(pythonrun.o): warning: relocation against _Py_UnhandledKeyboardInterrupt' in read-only section .text'
/usr/bin/ld: /usr/local/lib/libpython3.10.a(bytearrayobject.o): relocation R_X86_64_PC32 against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:135: /home/ash/omnetpp-master/out/gcc-release/src/sim/liboppsim.so] Error 1
make[1]: *** [Makefile:134: sim] Error 2
make: *** [Makefile:35: allmodes] Error 2
Do NOT use the omnetpp master branch. There is absolutely no guarantee that the master branch is properly working or at least compiling at any given time.

Unable to compile library, symbol not found when running make

I am trying to compile a library, MultiNest. I am on Mac OS Catalina, 10.15.6. The instructions to do so are
git clone https://github.com/JohannesBuchner/MultiNest
cd MultiNest/build
cmake ..
make
I get this error when running make:
Undefined symbols for architecture x86_64:
"___nested_MOD_nestrun", referenced from:
_run in eggbox.c.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/eggboxC] Error 1
make[1]: *** [src/example_eggbox_C/CMakeFiles/eggboxC.dir/all] Error 2
make: *** [all] Error 2

Error "make all" /usr/bin/ld: cannot find -lprotobuf when installing caffe

I want to install caffe with conda. In the tutorial I followed it was told to install these stuff
sudo apt-get install protobuf-compiler libprotobuf-dev
Soon I found out that is was out-of-date and removed both of them and got latest protoc 3.9.1 . But I'm facing an error that said there is no protobuff in the folder.
I got confused about protobuf lib and protoc.
I have only one protoc in this folder
protoc: /usr/bin/protoc
And here's what I have after performing
sudo make all -j4
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/convert_imageset.bin
CXX/LD -o .build_release/tools/upgrade_solver_proto_text.bin
CXX/LD -o .build_release/tools/extract_features.bin
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools
/convert_imageset.bin' failed
make: *** [.build_release/tools/convert_imageset.bin] Error 1
make: *** Ожидание завершения заданий…
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools
/upgrade_solver_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_solver_proto_text.bin]
Error 1
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools/upgrade_net_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools/extract_features.bin' failed
make: *** [.build_release/tools/extract_features.bin] Error 1
Can you help me solving this issue? And also it would be great if you explain me the matter with protoc and protobuff

compiling pango: undefined reference to `hb_ft_face_create'

I've been trying to compile pango-1.38.1
configure was fine however there is a link error during make:
Making all in pango-view
make[2]: Entering directory `/home/build/pango-1.38.1/pango-view'
CCLD pango-view
../pango/.libs/libpangoft2-1.0.so: undefined reference to `hb_ft_face_create'
../pango/.libs/libpangoft2-1.0.so: undefined reference to `hb_ft_face_create_cached'
collect2: ld returned 1 exit status
make[2]: *** [pango-view] Error 1
Harfbuzz and package config is installed/located in
/usr/local/lib/pkgconfig/harfbuzz.pc
$ echo $PKG_CONFIG_PATH
/usr/local/lib/pkgconfig/
Where can I find hb_ft_face_create?

Cross compile static libnuma for arm

I'm trying to cross compile libnuma for arm arch. In process of compiling i am facing below issue while generating libnuma.so file.
arm-linux-gnueabi-gcc -static -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -o libnuma.so.1 libnuma.o syscall.o distance.o
/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib/crt1.o: In function _start':
(.text+0x34): undefined reference tomain'
collect2: error: ld returned 1 exit status
make: *** [libnuma.so.1] Error 1
Can anyone please tell me how to overcome out of this issue inorder to generate static library?

Resources