Re: Setting environment and support of older OS/arch

2023-03-17 Thread Eckard Brauer

Hello Ken,

thanks a lot for the responses, but I already tried that without too
much success (CFLAGS and CXXFLAGS in that case), but will retry again.

And maybe I'll have to learn 'bit about cmake, as I'm much more
familiar with makefiles & Co. - that's the deal with too old people
sitting in frontof too old computers.

Best regards,
Eckard

Am 17.03.2023 um 14:12 schrieb Ken Cunningham:


You can also look into how to use pkgconfig and cmake to find needed
libraries.

They can suffice for simpler header and library path additions, and
often that might be all you need for a simpler project with just one
or two things needed.

K




Re: Setting environment and support of older OS/arch

2023-03-17 Thread Ken Cunningham
You can also look into how to use pkgconfig and cmake to find needed libraries.

They can suffice for simpler header and library path additions, and often that 
might be all you need for a simpler project with just one or two things needed.

K

Re: Setting environment and support of older OS/arch

2023-03-17 Thread Ken Cunningham
If you are doing your own compilation using the compilers and libraries from 
MacPorts, you need to direct your build to use the specified tools, headers, 
and libraries.

You can look at what MacPorts sets up itself for each build for a clue, for 
example this is setup for a generic build of something on an arm64 system 
running Ventura. 

You'd tweak this for a system running some other system like Leopard or Tiger, 
of course -- you can't just use this one.

you need to export all these environment variables in the shell before you 
start running your configure or make steps, so perhaps you might preface each 
one with "export " and make a shell script of this, to make it easier.

--
CC='/usr/bin/clang'
CFLAGS='-pipe -Os 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64'
CPATH='/opt/local/include'
CPPFLAGS='-I/opt/local/include 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
CXX='/usr/bin/clang++'
CXXFLAGS='-pipe -Os -stdlib=libc++ 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
F90FLAGS='-pipe -Os -m64'
FCFLAGS='-pipe -Os -m64'
FFLAGS='-pipe -Os -m64'
INSTALL='/usr/bin/install -c'
LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names 
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch 
arm64'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='13.0'
OBJC='/usr/bin/clang'
OBJCFLAGS='-pipe -Os 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64'
OBJCXX='/usr/bin/clang++'
OBJCXXFLAGS='-pipe -Os -stdlib=libc++ 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
--



Now you might rightly say this is harder than putting everything in /usr/local, 
and why did MacPorts put everything in /opt/local and make it so hard to use?

And there you would see the primary reason that homebrew came to exist, 10 or 
15 years ago.

But putting everything in /opt/local is actually defendable better in a number 
of ways, although does require a deeper level of understanding about what is 
doing on to make it work.

And don't even get me started about how to make MacPorts work with Xcode -- :>

Good luck, ask questions when you get stuck.

Ken