Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] problem building managed make project with CDT 2.0


Tim,
Let's take a different tack, here. Since you are not using an old GCC toolchain, we *could* modify the output extension for linker tool so that it generates '--output=mo_2' instead of '-omo_2'. Before we walk that path,

1. Switch to the Navigator view
2. Open the .cdtbuild file for the offending project
3. Find any XML entry that starts something like <toolReference id="cdt.managedbuild.tool.gnu.cpp.linker" (make sure you get them all)
4. Modify the outputFlag attribute so that it contains '--output='
5. Close and reopen the project to force the build info to update
6. Rebuild

If that does the trick, then we can modify the tool defs in your plugin.xml file so that this will be the default for all new projects.

Sean Evoy
Rational Software - IBM Software Group
Ottawa, Ontario, Canada



Timothy Perrigo <tperrigo@xxxxxxxxxxxxx>
Sent by: cdt-dev-admin@xxxxxxxxxxx

07/08/2004 10:20 AM

Please respond to
cdt-dev

To
cdt-dev@xxxxxxxxxxx
cc
Subject
Re: [cdt-dev] problem building managed make project with CDT 2.0





Sean,
No, my environment hasn't changed at all lately, and the gcc binaries
are in the standard location (/usr/bin) (see below).  Anything else I
can check?  I'm more than willing to do anything I can to help track
this down!

Tim

[oma-mac-tperrigo:~/workspace/mo_2/Debug] tperrigo% which g++
/usr/bin/g++
[oma-mac-tperrigo:~/workspace/mo_2/Debug] tperrigo% g++ --version
g++ (GCC) 3.3 20030304 (Apple Computer, Inc. build 1640)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

[oma-mac-tperrigo:~/workspace/mo_2/Debug] tperrigo% which ld
/usr/bin/ld


On Jul 8, 2004, at 9:00 AM, Sean Evoy wrote:

>
> Tim,
> I dunno if I would recommend going that route until we track down what
> the top-level makefile is complaining about:
>
> >  make -k all
>  >  makefile:15: no file name for `-include'
>  >  Building file: ../src/db_util.cpp
>
> It looks like a makefile I expected to find is either not being
> generated or is invalid somehow. Perhaps that is at the root of the
> problem....
>
> I have to admit that I'm surprised that the MacOS version of g++
> handles the lack of a space so badly. A (slim) possibility is that g++
> is somehow invoking the wrong 'ld'. I have had similar problems on
> Solaris where, due to installing GCC in a non-default location, the
> system linker was getting called. The only way I could force the GCC
> wrappers to do what I wanted was to add -B<path_to_gcc_binaries> to my
> compiler options. Has your environment changed at all (compiler
> upgrade, forgot to update the shell script you launch CDT with, ....)?
>
> Sorry for grasping at straws, but it is probably worth eliminating any
> of those possibilites first.
>
> Sean Evoy
>  Rational Software - IBM Software Group
>  Ottawa, Ontario, Canada
>
>
>
>
>
> Timothy Perrigo <tperrigo@xxxxxxxxxxxxx>
> Sent by: cdt-dev-admin@xxxxxxxxxxx
>
> 07/08/2004 09:34 AM
>
> Please respond to
>  cdt-dev
>
>
>
> To
> cdt-dev@xxxxxxxxxxx
>
> cc
>
> Subject
> Re: [cdt-dev] problem building managed make project with CDT 2.0
>
>
>
>
>
>
>
> Sean,
>  Thanks for the reply.  I'll look into the changes you mentioned, but I
>  know I won't be able to get to it anytime soon.  In the meantime, do
>  you happen to know if I can use CDT 2.0M9 (which has the spaces) with
>  Eclipse 3.0 GA?
>
>  Tim
>
>  On Jul 7, 2004, at 1:32 PM, Sean Evoy wrote:
>
>  >
>  > Timothy,
>  > We took the spaces out because people complained that the commands
>  > were invalid for the Win32 compilers, and the GCC tools did not seem
>  > to care if they were not there. At this point, it looks like we may
>  > need to further refine the syntax of the managed build schema to
> tell
>  > the generator when to put a whitespace in.
>  >
>  > Now, this is not going to happen for 2.0.1 because it will be too
>  > destabilizing. The generator is where the actual stuff gets done, so
>  > if you like, you can supply your own makefile generator that is
>  > identical to the default with the exception that the target rule
> has a
>  > whitespace again. I am working on the updated Extensibility document
>  > this week, so I can fire you off the section of text that describes
>  > this new functionality when I get it done. If you are in a hurry,
> you
>  > can add your own generator via the makefileGenerator attribute of
> the
>  > target extension.
>  >
>  > Hope this helps,
>  >
>  > Sean Evoy
>  >  Rational Software - IBM Software Group
>  >  Ottawa, Ontario, Canada
>  >
>  >
>  >
>  >
>  >
>  > Timothy Perrigo <tperrigo@xxxxxxxxxxxxx>
>  > Sent by: cdt-dev-admin@xxxxxxxxxxx
>  >
>  > 07/06/2004 07:25 PM
>  >
>  > Please respond to
>  >  cdt-dev
>  >
>  >
>  >
>  > To
>  > cdt-dev@xxxxxxxxxxx
>  >
>  > cc
>  >
>  > Subject
>  > [cdt-dev] problem building managed make project with CDT 2.0
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > I just installed Eclipse 3.0 and the CDT 2.0 this morning, and I've
>  >  been unable to build a managed make project which previously built
>  >  without error using Eclipse 3.0 RC 1 and CDT 2.0 M9.  I keep
> getting
>  > an
>  >  error from the linker due to a missing space between the -o and the
>  >  artifact name (mo_2, in my case).  The exact error is "ld: unknown
>  >  flag: -omo_2"; because of the missing space, it seems to be
> treating
>  > it
>  >  as a linker flag, rather than the name of the output file.  When I
>  >  switched back to M9, the space is present in the g++ command line
> (see
>  >  below for the command lines from each version).  I am using Mac OS
> X,
>  >  and I know the CDT is not officially supported for my platform...is
>  >  this a known issue?  Should I file a bug report?
>  >
>  >  Any help would be greatly appreciated.
>  >
>  >  Thanks,
>  >  Tim Perrigo
>  >
>  >  With Eclipse 3.0 (RC 1), CDT M9 (builds successfully):
>  >
>  >  make -k all
>  >  Building file: ../src/db_util.cpp
>  >  g++ -I/Users/tperrigo/workspace/mo_2/include
>  >  -I/usr/local/include/jwsmtp-1.30
>  >  -I/Users/tperrigo/workspace/IntervalSet/include
>  >  -I/usr/local/include/boost-1_31 -I/usr/local/pgsql/include
>  >  -I/usr/local/include -O0 -g3 -DDEBUG=true -Wall -c
> -fmessage-length=0
>  >  -Wno-long-double -o src/db_util.o ../src/db_util.cpp
>  >  Finished building: ../src/db_util.cpp
>  >
>  >  Building target: mo_2
>  >  g++ -L/usr/local/pgsql/lib -L/usr/local/lib -o mo_2    
>  >  src/MilesServer.o src/appointment_provider.o src/db_util.o
> src/email.o
>  >  src/exceptions.o src/location.o src/main.o src/mo_types.o
>  > src/profile.o
>  >  src/rate_service.o src/request.o src/request_provider.o
>  >  src/request_view_data.o src/result.o src/shemp.o src/stakeholder.o
>  
>  >  -lpqxx -lpq -leasysoap -lcrypto -lssl -lexpat -lboost_thread-1_31
>  >  -lIntervalSet -lboost_date_time -ljwsmtp
>  >  Finished building: mo_2
>  >  Build complete for project mo_2
>  >
>  >
>  >  With Eclipse 3.0 (GA), CDT 2.0 (GA) (fails to build):
>  >
>  >  make -k all
>  >  makefile:15: no file name for `-include'
>  >  Building file: ../src/db_util.cpp
>  >  g++ -I/Users/tperrigo/workspace/mo_2/include
>  >  -I/usr/local/include/jwsmtp-1.30
>  >  -I/Users/tperrigo/workspace/IntervalSet/include
>  >  -I/usr/local/include/boost-1_31 -I/usr/local/pgsql/include
>  >  -I/usr/local/include -O0 -g3 -DDEBUG=true -Wall -c
> -fmessage-length=0
>  >  -Wno-long-double -o src/db_util.o ../src/db_util.cpp
>  >  Finished building: ../src/db_util.cpp
>  >
>  >  make: *** [mo_2] Error 1
>  >  make: Target `all' not remade because of errors.
>  >  Building target: mo_2
>  >  g++ -L/usr/local/pgsql/lib -L/usr/local/lib -omo_2    
>  >  src/MilesServer.o src/appointment_provider.o src/db_util.o
> src/email.o
>  >  src/exceptions.o src/location.o src/main.o src/mo_types.o
>  > src/profile.o
>  >  src/rate_service.o src/request.o src/request_provider.o
>  >  src/request_view_data.o src/result.o src/shemp.o src/stakeholder.o
>  
>  >  -lpqxx -lpq -leasysoap -lcrypto -lssl -lexpat -lboost_thread-1_31
>  >  -lIntervalSet -lboost_date_time -ljwsmtp
>  >  ld: unknown flag: -omo_2
>  >  Build complete for project mo_2
>


Back to the top