FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

To Kent: -fwritable-strings in GCC Linux

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Merk



Joined: 22 Nov 2004
Posts: 192
Location: Wichita, KS

PostPosted: Sat Aug 18, 2007 8:38 am    Post subject: To Kent: -fwritable-strings in GCC Linux Reply with quote

Heya,

in GCC 4.0 for Linux, they've taken out the -fwritable-strings command-line option. In my research, I haven't found any alternative. The documentation says to use a named array (or something like that), or some other method that doesn't require string constants to be treated as non-constant. Where I've found people encountering this error, they've had to install an older version of GCC, such as version 2.95, to use this flag when compiling.

I've run a Linux binary of the HE Hugo Engine on my Linux boxes (primarily used as web servers, but I do some command-line stuff too) before. Today, I was trying to compile from the source code. I used the main Hugo source and the Linux source, and the makefile works fine. I get an HE executable. It works, because run without a parameter I'm told the correct format to use HE with the name of a file. So it runs. But when I supply the name of a file, it immediately segfaults.

Hence, I looked into your note in the "porting" info to use -fwritable-strings, and then my realization that it's no longer supported in GCC.

Any chance that the next version of the Hugo Engine will remove the need for writable strings by doing "whatever it's doing" in a different way?

---- Mike.
Back to top
View user's profile Send private message Visit poster's website
Kent



Joined: 27 Jun 2003
Posts: 119

PostPosted: Mon Aug 20, 2007 8:58 am    Post subject: Reply with quote

Thanks for the heads up. I'm not near a Unix/Linux machine where I can test a build, but is that switch still required? I had thought I'd removed its necessity on the basis of being a good programming citizen some time ago, but I may be wrong. If I'm wrong, it should be fixed, because it's probably bad programming karma to be doing what I'm doing to require it.
Back to top
View user's profile Send private message
Kent



Joined: 27 Jun 2003
Posts: 119

PostPosted: Mon Aug 20, 2007 9:00 am    Post subject: Reply with quote

Okay, sorry, I just read your post more carefully this time, and saw the word "segfault". That isn't what we in the business call "working".

Things are really busy right now, but when I get a chance to look into it, I will.
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Mon Aug 20, 2007 9:18 am    Post subject: Reply with quote

Kent wrote:
Things are really busy right now, but when I get a chance to look into it, I will.


I'm just throwing this out there: I'm guessing it would be helpful for Merk and I to keep track of Hugo oddities together, and then when the time comes for when you are ready for the list, we could provide it. The way my mind works, it's distracting to have a nebulous smattering of things on a "to do" list that are across websites and e-mails, so if we centralized it, it might be helpful.

(At the same time, I am hesitant to put up a Wiki for it that's open to the public, because I don't want to create the impression that Hugo is in any way not perfectly ready for game creation and play. So I need to think on this.)

I just want to throw it out in the open that you can say something like, "Hey, Robb, if you could gather up all the outstanding Hugo issues and document them someplace I'd appreciate it" and I would totally do that for you.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Merk



Joined: 22 Nov 2004
Posts: 192
Location: Wichita, KS

PostPosted: Mon Aug 20, 2007 2:30 pm    Post subject: Reply with quote

Well, it works in that after it compiles, it runs without a segmentation fault as long as it's not actually running a game. In other words, I can run "he" and it'll give me some usage information about supplying the name of a Hugo hex file to run. So the binary *did* compile okay.

It's only when I run it with a .hex file name as a paramater that I get the segfault. Granted, I may have jumped to the conclusion that it's because of the -fwritable-strings compile flag, when maybe that's not it. In my research, I did see that the compiler was supposed to *complain* if it hits code that would trigger a segfault at runtime, where the -fwritable-strings would previously have taken care of it, and no such compile error happens.

So, I dunno. Maybe there is something else missing. I compiled with the included makefile, and with the base Hugo source and the Linux source unarchived. I didn't add anything else (no other source packages) to it, and it didn't complain about missing dependencies or anything.

Maybe it's another matter entirely. I gave up when I thought it was probably the -fwritable-strings thing...
Back to top
View user's profile Send private message Visit poster's website
Merk



Joined: 22 Nov 2004
Posts: 192
Location: Wichita, KS

PostPosted: Mon Aug 20, 2007 7:38 pm    Post subject: Reply with quote

And yeah, I can help put together some kind of bug and/or wish list for Hugo. I think everything I've found, I've posted here, so it should be easy to dig it all up. :)
Back to top
View user's profile Send private message Visit poster's website
Kent!
Guest





PostPosted: Fri Aug 24, 2007 10:26 pm    Post subject: Reply with quote

A list sounds like a pretty good idea. Partly because then I might feel some guilt if I don't actually get those things done when I finally have the time.
Back to top
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Sat Aug 25, 2007 11:58 am    Post subject: Reply with quote

Whatever, you guilty bastard.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended