Building GCC

Jose

Aspiring Daemon

Reaction score: 743
Messages: 869

gmake doesn't stop after the compile stage is complete and the link step begins. The building process starts automatically. So, how do you handle that?
Of course not, build tools like make are supposed to handle invoking the compiler and the linker for you, and shouldn't stop until the entire build (and possibly tests) are finished (Edit: or fail.) The configure step is supposed to massage or generate the build tool's configuration files such that the compiler, linker and whatever else are invoked with the proper arguments for your system.

The handmade Tcl configure tool this project uses doesn't do a great job of this, as you've already discovered. I discovered that it does not generate the correct Tcl/Tk linker flags. See the diff above for details.
 
OP
X

xsundevil

Member

Reaction score: 2
Messages: 60

You said above that the configure file needed to be amended. Did you mean that, also, SYS_LDFLAGS needed changes or does it keep the setting you give it at the beginning?

Now, I'm getting errors at "Building cbh2si4". Lots of errors such as "Tcl_CreateInterp, referenced by cb2si4.cpph73, cbh2si4.o:( Tclnterpreter::Tclnterpreter())"

And, "error: undefined symbol: Tcl_UniCharToLower, referenced by sys_utf8:ipp:172 (../sys/sys_utf8.ipp:172). U_match.o:(sys::utf8::toLower(unsigned short)) in archive util/libutil.a.

Also, some errors referenced by sys_utf8.o, sys_file.o,

By the way, are you figuring this out as we go? I ask because it kind of feels like there could be a lot more errors to fix, but I wish I'm wrong.
 

Jose

Aspiring Daemon

Reaction score: 743
Messages: 869

You said above that the configure file needed to be amended. Did you mean that, also, SYS_LDFLAGS needed changes or does it keep the setting you give it at the beginning?
You have to do both the configure script changes, and setting the SYS_LDFLAGS environment variable when you invoke configure. Both persist until configure is run again.
Now, I'm getting errors at "Building cbh2si4". Lots of errors such as "Tcl_CreateInterp, referenced by cb2si4.cpph73, cbh2si4.o:( Tclnterpreter::Tclnterpreter())"
Didn't get this one, probably because I used Tcl/Tk 8.6.
And, "error: undefined symbol: Tcl_UniCharToLower, referenced by sys_utf8:ipp:172 (../sys/sys_utf8.ipp:172). U_match.o:(sys::utf8::toLower(unsigned short)) in archive util/libutil.a.
That's interesting. I actually got duplicate symbol there, and I fixed it with the change in src/tk/text/tkTextPriv.h:
https://gitlab.com/jose1234567/scid...5548#341a6869b57ffd2b358f02540ab37bc5b89bf5d0
You may have to revert that change, but I'm guessing what's actually happening is you're not passing -ltcl86 to the linker.
Also, some errors referenced by sys_utf8.o, sys_file.o,
Probably not linking to libtcl86 here too.
By the way, are you figuring this out as we go? I ask because it kind of feels like there could be a lot more errors to fix, but I wish I'm wrong.
Nope. I got it to compile and link last Wednesday.
 
Top