Good news. I have a fix for the problem compiling STAF on Linux Ubuntu
systems that use later gcc versions. It appears that gcc's linker provided
with later versions of Ubuntu requires that you put the libraries you are
linking after the object files in the g++ link command. I found this when
googling for this problem,
I made a couple of changes to STAF makefiles to put the STAF libraries
being linked after the STAF objects in the g++ link commands and now the
STAF core components are compiling on my Ubuntu machine. So, that
explains why building STAF works on our Linux SLES machines but not on
your Ubuntu machine as the gcc provided by SLES does not have this
requirement. I'll open a STAF bug and check in these makefile changes for
the next version of STAF after I verify that it doesn't break anything
when building STAF on other Unix operating systems that use gcc.
Here's a diff of the STAF makefile code changes I made to fix this problem
in case you want to try them out before I check in these changes:
$ cvs diff makefile build/makefile.gcc
Index: makefile
===================================================================
RCS file: /cvsroot/staf/src/staf/makefile,v
retrieving revision 1.22
diff -r1.22 makefile
616c616
< ALL_LIB_LIST_RAW ?= $(CC_LIBS) $(OS_LIBS) $(LIBS)
---
> ALL_LIB_LIST_RAW ?= $(CC_LIBS) $(LIBS) $(OS_LIBS)
Index: build/makefile.gcc
===================================================================
RCS file: /cvsroot/staf/src/staf/build/makefile.gcc,v
retrieving revision 1.17
diff -r1.17 makefile.gcc
87c87
< $(ALL_LIBDIR_LIST) $(ALL_LIB_LIST) $(OBJS)
---
> $(ALL_LIBDIR_LIST) $(OBJS) $(ALL_LIB_LIST)
90,91c90
< $(ALL_INCLUDEDIR_LIST) $(ALL_LIBDIR_LIST)
$(ALL_LIB_LIST)
< $(OBJS)
---
> $(ALL_INCLUDEDIR_LIST) $(ALL_LIBDIR_LIST) $(OBJS)
$(ALL_LI_LIST)
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Sarmistha Mahapatra <sarmistha.mahapa...@kpit.com>
To: Sharon Lucas/Austin/IBM@IBMUS,
Date: 04/08/2014 11:34 PM
Subject: RE: [staf-users] Error compiling STAF on Ubuntu 12.04
Hi,
We are trying to cross compile STAF for Linux ARM(imax536) processor.
Is it compatible for ARM.
Regards,
Sarmistha
From: Sharon Lucas [mailto:luc...@us.ibm.com]
Sent: 09 April 2014 00:16
To: Nisha Parrakat
Cc: staf-users@lists.sourceforge.net
Subject: Re: [staf-users] Error compiling STAF on Ubuntu 12.04
Is the machine that you're trying to compile STAF on a x86 (32-bit)
architecture Linux Ubuntu system? If not, what architecture is it?
What version of gcc/g++ are you using? As noted in that posting, we
haven't compiled STAF using the latest versions of gcc/g++ so it is
possible that there may be some STAF source code changes needed STAF to
support latest gcc compiler changes (as new GCC versions may introduce
incompatibilities) or possibly a small change to a STAF build file like
staf/build/makefile.gcc. We use gcc 4.1.2 or earlier on our Linux build
systems, though we would like to support later GCC versions. Let me know
if you find out how to resolve this issue (and if I do I'll post here).
Is it possible to try using an earlier version of gcc on your system to
compile STAF? Otherwise, need to look at what changes have been in gcc /
ld to see if changes need to be made to STAF source code. For example,
the following links talk about changes in later GCC versions:
Updates in the 4.2 Series: http://gcc.gnu.org/gcc-4.2/changes.html
Updates in the 4.3 Series: http://gcc.gnu.org/gcc-4.3/changes.html
Updates in the 4.4 Series: http://gcc.gnu.org/gcc-4.4/changes.html
Also, the GCC porting guides may be useful. For example:
- http://gcc.gnu.org/gcc-4.3/porting_to.html
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Nisha Parrakat <nisha.parra...@kpit.com>
To: "staf-users@lists.sourceforge.net" <
staf-users@lists.sourceforge.net>,
Date: 04/08/2014 02:08 AM
Subject: [staf-users] Error compiling STAF on Ubuntu 12.04
Hi,
I have a similar query as posted (about an year ago)in the link below
http://sourceforge.net/p/staf/discussion/104045/thread/5d554cb4/#15a3
I am trying to compile staf on ubuntu 12.04 . I have set up the following
environment variables
as below
export STAF_USE_SSL=
export PROJECTS="staf"
export OS_NAME=linux
export BUILD_TYPE=debug
export STAF_USE_IPV6=
export CC_NAME=gcc
I get the following errors :-
/home/nishap/staf/obj/linux/staf/debug/serviceproxies/execproxy/STAFExecProxy.o:
In function `main':
/home/nishap/staf/src/staf/serviceproxies/execproxy/STAFExecProxy.cpp:57:
undefined reference to `STAFEventSem::STAFEventSem(char const*)'
and many more.
Please help. We need to compile this on host and then try cross
compilation.
We are unable to cross compile Staf also which we want to do so that we
can run the same on the
target for tests.
Regards,
Ms Nisha Parrakat
KPIT Technologies Ltd, Pune, INDIA
This message contains information that may be privileged or confidential
and is the property of the KPIT Technologies Ltd. It is intended only for
the person to whom it is addressed. If you are not the intended recipient,
you are not authorized to read, print, retain copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies of this message. KPIT Technologies Ltd. does not accept any
liability for virus infected mails.
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
This message contains information that may be privileged or confidential
and is the property of the KPIT Technologies Ltd. It is intended only for
the person to whom it is addressed. If you are not the intended recipient,
you are not authorized to read, print, retain copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies of this message. KPIT Technologies Ltd. does not accept any
liability for virus infected mails.
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users