Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Can forte be compile under macos?
Can forte be compile under macos? [message #1821014] Tue, 04 February 2020 15:04 Go to next message
joy woo is currently offline joy wooFriend
Messages: 195
Registered: May 2019
Senior Member
I compile the forte under macos, but when compling it with Xcode, it seems part of the source still point to poxis architecture
Re: Can forte be compile under macos? [message #1821015 is a reply to message #1821014] Tue, 04 February 2020 15:05 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 99
Registered: March 2016
Member
It does, because MacOS is POSIX compliant for the larger part.
Re: Can forte be compile under macos? [message #1821122 is a reply to message #1821015] Thu, 06 February 2020 03:10 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 195
Registered: May 2019
Senior Member
but when i complie the latest version of forte, it failed

Undefined symbols for architecture x86_64:

"timespecAdd(timespec const*, timespec const*, timespec*)", referenced from:

CPCTimerHandler::run() in pctimeha.o

"timespecSub(timespec const*, timespec const*, timespec*)", referenced from:

CPCTimerHandler::run() in pctimeha.o

"timespecLessThan(timespec const*, timespec const*)", referenced from:

CPCTimerHandler::run() in pctimeha.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)







Showing Recent Issues

: "timespecAdd(timespec const*, timespec const*, timespec*)", referenced from:

Re: Can forte be compile under macos? [message #1821152 is a reply to message #1821122] Thu, 06 February 2020 11:31 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
maybe adding forte_add_sourcefile_hcpp(../utils/timespec_utils) in src/arch/macos/CMakeLists.txt could help

Re: Can forte be compile under macos? [message #1821480 is a reply to message #1821152] Thu, 13 February 2020 14:14 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 99
Registered: March 2016
Member
oh yeah, thanks Jose.
Seems that I missed adding this to the MacOS build back then
Re: Can forte be compile under macos? [message #1821496 is a reply to message #1821480] Thu, 13 February 2020 15:35 Go to previous messageGo to next message
joy woo is currently offline joy wooFriend
Messages: 195
Registered: May 2019
Senior Member
sorry for late reponse, that did work, thank you very much,both!
Re: Can forte be compile under macos? [message #1841415 is a reply to message #1821014] Sat, 15 May 2021 01:21 Go to previous messageGo to next message
Alexander La Spina is currently offline Alexander La SpinaFriend
Messages: 2
Registered: May 2021
Junior Member
Joy, Martin,

If you don't mind could you please post what versions of OS X and Xcode your using to compile Forte Runtime on MacOS and possibly your folder structure and CMake generate options.

I have tried both Cmake methods of using Xcode and unix makefile + command line tools but encounter numerous errors during build/make.

I have tried Xcode 10.3 on OS X 10.14.6 (Mojave) as well as Xcode 12.5 on OS X 11.3 (Bigsur).

To name a few compile errors:

FORTE_LITE
fortenew.h
'Replacement function operator new cannot be declared inline'

threadbase.h
'non-type template argument does not refer to any declaration'

forte_thread.h
'unknown type name 'TThreadHandleType'

fdselecthand.h
'use of undeclared identifier start'

Your feedback would be much appreciated.
Re: Can forte be compile under macos? [message #1841430 is a reply to message #1841415] Sun, 16 May 2021 14:38 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1214
Registered: January 2014
Senior Member
Hi,

can you provide us the full compile output. I tried to google a bit with what you posted above and I can not find a cause. Most probably there are some compiler switches that need to be changed. But without more information I have a hard time finding these.

Has anybody tried compiling 4diac FORTE with llvm/clang recently?
Re: Can forte be compile under macos? [message #1841450 is a reply to message #1841430] Mon, 17 May 2021 09:41 Go to previous messageGo to next message
Alexander La Spina is currently offline Alexander La SpinaFriend
Messages: 2
Registered: May 2021
Junior Member
Hi Prof. Zoitl,

Thank you very much for your response to my post.

I have attached the output of both an Xcode compile and Command Line 'make' compile using unix make files. I have uploaded them as .pdf as to keep the formatting and colours. For the Xcode output I issued the Xcode build command from the terminal so i could easily capture the output, errors are displayed in a project tree format within Xcode - hard to copy to text, but the build errors/warnings are identical. I could post some screen captures from inside Xcode if needed.

Both times the only CMake options I adjusted were:

FORTE_ARCHITECTURE = MacOS
FORTE_MODULE_CONVERT = TRUE
FORTE_MODULE_IEC61131 = TRUE
FORTE_MODULE_UTILS = TRUE

For Generator [Unix Makefiles] i also added
CMAKE_BUILD_TYPE = Debug

I did not add/adjust CMake_build_type for Generator [Xcode].

Both of the attached outputs are from an x86 Mac, so as to not confuse the issue between apple architecture changes and new options in Xcode now that Apple Silicon (M1 cpu) is supported.

Currently I am successfully running the 4diac IDE on both x86 MacOS and Apple M1 aarch64 MacOS. I am running FORTE (forte.exe windows binary) using CrossOver for Mac (commercial WINE style emulator) on Apple M1... it all works perfectly but being able to compile a native (x86 or aarch64) would be so much better.

On a side note, keep up the amazing work you are doing in the industrial automation sector and your open source and platform neutral approach :)

Thanks again. Alex.
Re: Can forte be compile under macos? [message #1841452 is a reply to message #1841450] Mon, 17 May 2021 12:48 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1214
Registered: January 2014
Senior Member
thanks for the full output. It could be that pthread_t is defined differently on MacOS. Could you try changing the line 31 of src/arch/posix/forte_thread.h to

class CPosixThread : public forte::arch::CThreadBase<pthread_t, 0, forte::arch::EmptyThreadDeletePolicy> {


And thanks for your kind words.
Previous Topic:I can't find deployment in perspectice
Goto Forum:
  


Current Time: Mon May 17 17:24:43 GMT 2021

Powered by FUDForum. Page generated in 0.03153 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top