How do I build macports 2.6.3 on Mac OS X Big Sur Beta? "Unsupported architecture" error - macports

I am getting build errors when I build MacPorts on my iMac running the latest Big Sur beta. Yeah I know, it's beta, but I think my question is still relevant. Please see below for the full error message (first error of many). Thanks for any help!
clang -MM -MP -DHAVE_CONFIG_H -I/Users/rcook/current_projects/macports-base/src -I/Users/rcook/current_projects/macports-base/src -I. -I/Users/rcook/current_projects/macports-base/vendor/vendor-destroot/opt/local/libexec/macports/include -I./../compat access.c > access.d
clang -g -O2 -std=c99 -Wextra -Wall -fPIC -arch arm64 -arch x86_64 -DHAVE_CONFIG_H -I/Users/rcook/current_projects/macports-base/src -I/Users/rcook/current_projects/macports-base/src -I. -I/Users/rcook/current_projects/macports-base/vendor/vendor-destroot/opt/local/libexec/macports/include -I./../compat -c -o access.o access.c
In file included from access.c:36:
In file included from ./darwintrace.h:40:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture

Related

windows crosscompiling from linux entry point not found curl_easy_cleanup could not located

I am unsure of what could be causing this as I have tried recompiling libcurl and using pre-compiled binaries.
My compiler command
x86_64-w64-mingw32-gcc -Wall -Lwin-lib -Iwin-lib -I./ -D WIN32 -D CURL_STATICLIB -mwindows ... -o win-export/SLM.exe -lm -lraylib -ltmx -lxml2 -lzlibstatic -lcurl
There aren't any compiler errors or linker errors. Is this a problem with my compiler? Or one the other libraries I am using?

GCC ld: symbol(s) not found for architecture x86_64 error when trying to compile old programs

I have a program wrote back when I was still at university, and it was running fine on ubuntu 16.04. Today I was trying to compile it on my Mac which is running OS version 11.2.3, and got the following error: "symbol(s) not found for architecture x86_64."
I did some research, it seems that this error is related to makefile, but I cant figure out what is wrong. Here is what I have in Makefile:
lander: lander.o
gcc -std=c99 -Wall -o lander lander.o -lm -lncurses
lander.o: lander.c
gcc -std=c99 -Wall -c lander.c -g
clean:
-rm -f *.o lander core
First time asking a question here, if the format of my text looks bad, I apologize in advance. Thank you.

clang fatal error: fatal error: 'stdint.h' file not found

Getting clang error:
fatal error: 'stdint.h' file not found
I have extracted the exact compilation command from makefile which is throwing the above error:
clang -MD -MP -std=c99 -include sys/cdefs.h -Wall -O2 -target armv6k-none-eabi -mfloat-abi=soft -m32 -emit-llvm -ffreestanding -nostdlib -nostdinc -Wno-c11-extensions -I/Path/To/Project/include -I/Path/To/Project/genconfig -c folder1/abc.c -o folder1/abc.bc
somefile.h:50: fatal error: 'stdint.h' file not found
# include <stdint.h>
^
The somefile.h is just a normal file inside the project.
Would like to know why the above clang command is generating the mentioned compilation error.
In addition to the above main question, Anyone please explain what is this .bc file - see at the end of command? In general few words about this llvm-clang concept. I would Highly appreciate it.
I have to compile without using standard headers. So -nostdinc option should be present in the command. Actually I am compiling some kernel (small version) which is not suppose to use standard includes or libs.
My system:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial

gcc cannot find -lglfw3 && i was unable to add the path

I am running CentOS 6.4, I have just installed GLFW 3.0.4 for some software package for CFD L-B visualisation. That's not my issue, the issue is that I was following instructions to test of GLFW was installed properly, I ran into some issues.
I began by
g++ -c main.cpp
Which has outputted main.o file, and went onto run this with the help of advice of another thread :
g++ main.o -o main.exec `pkg-config --libs glfw3` -lGL -lGLU -lglfw3 -lX11 -lXxf86vm -lXrandr -lpthread -lXi -ldlD
which has then given me this error code:
Package glfw3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glfw3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glfw3' found
/usr/bin/ld: cannot find -lglfw3
collect2: ld returned 1 exit status
Have tried adding -L or -B to the path of glfw3.pc and no use,
Can you please advise on how I can get this to work properly?

Eclipse -lcurl not find

I need a special compiler. This is my call from eclipse:
powerpc-stw-linux-uclibc-g++ -L/usr/lib/i386-linux-gnu -L/usr/lib -L/usr/libx32 -L/var/lib -o "Test" ./src/Test.o -lz -lcurl
But now Eclipse throw this:
/opt/powerpc-gcc-4.4.3-uclib/bin/../lib/gcc/powerpc-stw-linux-uclibc/4.4.3/../../../../powerpc-stw-linux-uclibc/bin/ld: skipping incompatible /usr/lib/i386-linux-gnu/libcurl.so when searching for -lcurl
/opt/powerpc-gcc-4.4.3-uclib/bin/../lib/gcc/powerpc-stw-linux-uclibc/4.4.3/../../../../powerpc-stw-linux-uclibc/bin/ld: skipping incompatible /usr/lib/i386-linux-gnu/libcurl.a when searching for -lcurl
/opt/powerpc-gcc-4.4.3-uclib/bin/../lib/gcc/powerpc-stw-linux-uclibc/4.4.3/../../../../powerpc-stw-linux-uclibc/bin/ld: cannot find -lcurl
I tried to compile under Ubuntu 14.04 x86. libcurl should be installed
$ curl-config --libs
-L/usr/lib/i386-linux-gnu -lcurl
Obviously, you are building for PowerPC, but linking with the lib for i386.
You need to download/build libcurl for PowerPC, and provide the correct path to it.
In other words, don't mix two different architectures.

Resources