Install Qt4 on macOS Big Sur - macos

I want to install qt4 on my mac, but whenever I type in brew install qt#4 I get the error
x86_64cpuid.s:273:7: error: invalid token in expression
cmpq $0,%rax
^
x86_64cpuid.s:273:7: error: invalid operand
cmpq $0,%rax
^
x86_64cpuid.s:274:9: error: invalid token in expression
cmoveq %rcx,%rax
^
x86_64cpuid.s:274:9: error: invalid operand
cmoveq %rcx,%rax
^
I tried brew install openssl#1.0 and got the same errors.
I tried to follow this instructions here from the Qt doc, but I get two errors while running make.
../../include/QtCore/../../src/corelib/arch/qatomic_powerpc.h:126:36: error:
invalid output constraint '=&b' in asm
: [originalValue] "=&b" (originalValue),
^
../../include/QtCore/../../src/corelib/arch/qatomic_powerpc.h:143:36: error:
invalid output constraint '=&b' in asm
: [originalValue] "=&b" (originalValue),
^

From filename qatomic_powerpc.h I can guess that it tries to build powerpc binaries, while that architecture has been dropped since 10.6 ‘Snow Leopard’.
While I imagine it is possible to patch Qt 4 sources to make it buildable on Big Sur, I'd like to ask what do you need it for? Most likely a better approach is to port the code to Qt 5.15.2.
Note there is a resolved bug report about that: https://trac.macports.org/ticket/61886

Related

How to install valgrind on macOS Big Sur?

I have recently purchased an M1 MacBook Pro and I am having issues installing valgrind on macOS Big Sur.
What I have tried so far is:
brew install valgrind which pops the error (brew is updated)
Error: invalid attribute for formula 'valgrind': version (nil)
edited head as indicated here
download manually from GitHub following all indications listed but I get
Last 15 lines from /Users/homeuser/Library/Logs/Homebrew/valgrind/03.make:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:254:9: error: unknown type name '_STRUCT_X86_DEBUG_STATE64'
typedef _STRUCT_X86_DEBUG_STATE64 x86_debug_state64_t;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:260:9: error: unknown type name '_STRUCT_X86_PAGEIN_STATE'
typedef _STRUCT_X86_PAGEIN_STATE x86_pagein_state_t;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:266:9: error: unknown type name '_STRUCT_X86_INSTRUCTION_STATE'
typedef _STRUCT_X86_INSTRUCTION_STATE x86_instruction_state_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [fixup_macho_loadcmds] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
looked into this older fix that used to work
Unfortunately none of the methods work so I would really appreciate a solve to this problem as I need to use valgrind on a daily basis for university homework.
Definitive answer. See the configure.ac autoconf file for the exact details. Starting from line 5021 [which may change in future versions, obviously] there is a switch on the kernel versions.
The last version of macOS officially supported by Valgrind was 10.13 on Intel. Neither macOS 11/12 (any architecture) nor ARM are supported.
Getting Valgrind to work on macOS 11/12 ARM hardware would require
filling in all of the gaps from 10.13 to 11/12
ARM assembly code for low level functions like syscalls
There is Linux ARM support, so the second point might not be so difficult. I don't have an ARM based mac, so I'm not vounteering for the moment.

How can I compile JonesForth on OS X v10.14 (Mojave)?

Attempting to compile JonesForth on OS X, it throws:
jonesforth.S:1154:10: fatal error: 'asm/unistd.h' file not found".
So I tried this advice for Linux, but it still complains.
This PowerPC port throws other exceptions, like:
invalid instruction mnemonic 'bctr'
unexpected token in memory operand
Is there an OS X port around?
This port of JonesForth compiles on OS X.

error while installing Cilk Plus compiler on macOS Catalina and Xcode 11

I'm trying to instal Cilk Plus compiler, on a iMac with macOS Catalina and Xcode 11 with this guidelines,
I used the command
cmake -G "Unix Makefiles" -DINTEL_SPECIFIC_CILKPLUS=1 -DCMAKE_INSTALL_PREFIX=/install/prefix -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
to create the binaries, and when I try to instal with the command
make && make install
show me the error
/cilk/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:144:22: error: conflicting types for 'dispatch_sync' DISPATCH_INTERCEPT_B(dispatch_sync)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/dispatch/queue.h:288:1: note: previous declaration is here dispatch_sync(dispatch_queue_t queue, DISPATCH_NOESCAPE dispatch_block_t block);
/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:145:22: error: conflicting types for 'dispatch_barrier_sync' DISPATCH_INTERCEPT_B(dispatch_barrier_sync)
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/dispatch/queue.h:1363:1: note: previous declaration is here dispatch_barrier_sync(dispatch_queue_t queue,
/cilk/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:162:24: error: conflicting types for 'dispatch_once' TSAN_INTERCEPTOR(void, dispatch_once, dispatch_once_t *predicate,
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/dispatch/once.h:73:1: note: previous declaration is here
dispatch_once(dispatch_once_t *predicate,
3 errors generated.
make[2]: *** [projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_osx_dynamic.dir/rtl/tsan_libdispatch_mac.cc.o] Error 1
make[1]: *** [projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_osx_dynamic.dir/all] Error 2
make: *** [all] Error 2
so my question is, Cilk plus is compatible with macOS Catalina and Xcode 11? if it is how I can solve this errors
Intel Cilk Plus was deprecated in 2018, so there is little chance that it works on the latest platform.

Error while building Linux Kernel 2.6.10 Error: operand type mismatch for `mov'

I am learning writing Linux Kernel Modules and following the book Linux Device Drivers. which instructs building and configure a kernel of 2.6.x . I am using kernel version 2.6.10. I followed the steps on thegeekstuff.com/compile-linux-kernel
i.e. I after untarring in the /usr/src directory, I did
$ make menuconfig #this opened up a gui
then I saved the config without making any changes, in the hope to enforce default configuration and then
$ make.
when I did make, it gave me this error and the warning’
include/asm/mpspec_def.h:78:2: warning: ‘packed’ attribute ignored for field
of type ‘unsigned char[6]’ [-Wattributes]
arch/i386/kernel/process.c: In function ‘show_regs’:
arch/i386/kernel/process.c:259:2: warning: pointer targets in passing argument 2 of ‘show_trace’ differ in signedness [-Wpointer-sign]
include/asm/processor.h:499:6: note: expected ‘long unsigned int *’ but argument is of type ‘long int *
arch/i386/kernel/process.c: Assembler messages:
arch/i386/kernel/process.c:384: Error: operand type mismatch for mov'
arch/i386/kernel/process.c:385: Error: operand type mismatch formov'
arch/i386/kernel/process.c:461: Error: operand type mismatch for `mov'
include/linux/elfcore.h:92: Error: operand type mismatch for mov'
include/linux/elfcore.h:92: Error: operand type mismatch formov'
arch/i386/kernel/process.c:583: Error: operand type mismatch for mov'
arch/i386/kernel/process.c:584: Error: operand type mismatch formov'
arch/i386/kernel/process.c:591: Error: operand type mismatch for mov'
arch/i386/kernel/process.c:592: Error: operand type mismatch formov'
make1: [arch/i386/kernel/process.o] Error 1
make: [arch/i386/kernel] Error 2
I have not written professional kernel code before so I am not sure if I should make any changes in the code. Can anybody help me with why this error occurred and how it can be removed. I used the default kernel config. prior to calling make using make menu-config.
The error in the process.c is in savesegment(fs,p->thread.fs); (all instances of the error are from the same function)
Thanks
It is not clear from your question that what are the exact steps you did.
This error may be due to some issues in configuration.
Please try the following steps and see if it solves the problem:
> make defconfig #Creates a default config based on your machine architecture
> make
I used a kernel version who version was closer to my native kernel version ~ 3.11.1. and used make oldconfig instead. This was easier than figuring out each configuration setting for my architecture.

Unable to build Boost.Python

I am trying to build boost.python following this link.
When I try to compile using ./b2 or ./bjam, I am getting errors like:
error: No best alternative for /python_for_extensions
next alternative: required properties: <python>2.6 <target-os>linux
matched
next alternative: required properties: <python>2.6 <target-os>linux
matched
The error disappears when I added this line:
using python : 2.6 : /usr/bin/python2.6 : /usr/include/python2.6 : /usr/lib/python2.6 : <python-debugging>on ;
in
/home/kchaitanya/boost/boost_1_50_0/tools/build/v2/user-config.jam
However, when compiling now, I get compile time errors of not being able to find header files. Just a small excerpt of the errors is:
...patience...
...patience...
...found 1548 targets...
...updating 62 targets...
gcc.compile.c++ bin.v2/libs/python/build/gcc-4.1.2/release/link-static/threading multi/numeric.o
In file included from ./boost/python/detail/prefix.hpp:13,
from ./boost/python/numeric.hpp:8,
from libs/python/src/numeric.cpp:6:
./boost/python/detail/wrap_python.hpp:50:23: error: pyconfig.h: No such file or directory
./boost/python/detail/wrap_python.hpp:75:24: error: patchlevel.h: No such file or directory
./boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for
./boost/python/detail/wrap_python.hpp:142:21: error: Python.h: No such file or directory
./boost/python/instance_holder.hpp:34: error: ‘PyObject’ has not been declared
./boost/python/instance_holder.hpp:41: error: expected ‘;’ before ‘(’ token
./boost/python/instance_holder.hpp:45: error: ‘PyObject’ has not been declared
./boost/python/detail/wrapper_base.hpp:21: error: expected initializer before ‘*’ token
./boost/python/detail/wrapper_base.hpp:23: error: expected initializer before ‘*’ token
Need help on building this boost.python.
The problem was not installing the python-devel or python-dev package corresponding to my python version.
In my case it was python2.6 so
sudo yum install python26-devel did the trick.
I had a similar issue in my project and above would not help. I was cross-compiling python and boost, and the actual issue for me was duplication of the 'using python : ' in configuration (one existed in project-config.jam, following the bootstrap.sh/bat execution and I was trying to add another python config myself to a user-config.jam).
This solution was described in here:
http://comments.gmane.org/gmane.comp.lib.boost.build/22088
and here:
https://groups.google.com/forum/#!topic/boost-developers-archive/namMFSO_6Rg

Resources