[Gate-users] Install GATE in Mac os Mavericks

Marc Chamberland MarcChamberland at cmail.carleton.ca
Thu Mar 13 12:57:20 CET 2014


Hi Pedro,

I'm not sure about your OGLS problem, but yes, the crash you experience with Qt is probably the same one I had.

Look at Jérôme's message that I linked to in my previous message. You need to add the following lines in the file Gate.cc (in the source code of Gate):

#ifdef __APPLE__
		/*
		 * If the program was started by double-clicking on the application bundle on Mac OS X
		 * rather than from the command-line, enable Qt and don't try to process other options;
		 * argv[1] contains a process serial number in the form -psn_0_1234567
		 * OS X <= 10.8 have a -psn_XXX argument given by the system
		 * OS X >= 10.9 does not have one, so we use the "TERM" environment variable
		 * to distinguish between launched by the Terminal or by the system.
		 */
		if ( ( (argc > 1) && (strncmp( argv[1], "-psn", 4 ) == 0) ) || getenv("TERM") == NULL ) {
			argc = 1;
			isQt = 1;
			break;
		}
#endif

In the current version of Gate 6.2 distributed on the website, those lines go just before lines 185-186 which are:

     // Getting the option
      c = getopt_long( argc, argv, "ha:", longOptions, &optionIndex );


Once you've added the lines above, save the file, then recompile Gate. Qt visualization should work again.


Marc



__________________________

Marc Chamberland, MSc
PhD candidate
Department of Physics
Carleton University
Ottawa (ON)

On Mar 12, 2014, at 15:45, pmcorreia at ua.pt wrote:

> Dear all
> 
> Is this related with the fact that I cannot have any OpenGL visualizer in Gate installed in OS X 10.9?
> 
> When I type
> /vis/open OGLS
> 
> I get
> 
> ERROR: G4VisCommandSceneHandlerCreate::SetNewValue: could not find fallback graphics system.
> ERROR: G4VisCommandViewerCreate::SetNewValue: no scene handlers.
>  Create a scene handler with "/vis/sceneHandler/create"
> 
> And when I start Gate with "Gate --qt" I have the crash problem described by Marc.
> 
> Regards, Pedro
> ________________________________________
> De: gate-users-bounces at lists.opengatecollaboration.org <gate-users-bounces at lists.opengatecollaboration.org> em nome de Mojca Miklavec <mojca.miklavec.lists at gmail.com>
> Enviado: quarta-feira, 12 de Março de 2014 18:58
> Para: Marc Chamberland; David Sarrut
> Cc: Gate Users
> Assunto: Re: [Gate-users] Install GATE in Mac os Mavericks
> 
> On Wed, Mar 12, 2014 at 7:30 PM, Marc Chamberland wrote:
>> Hi Mojca,
>> 
>> This discussion reminded me of a problem with Gate, Qt, and OS X 10.9.
>> 
>> Double-clicking the Gate app icon or using the --qt option on the command
>> line results in a segmentation fault. Jérôme provided the following fix:
>> http://article.gmane.org/gmane.comp.science.opengate.user/3434/match=mac+os+qt
> 
> Oh, thanks a lot for pointing this out. I forgot about it (and I don't
> use 10.9 myself, so I didn't spot the problem).
> 
>> I hope it will be fixed in the next release of Gate, but in the meantime,
>> I've patched my Gate port installation.
>> 
>> I don't know if it's worth it to provide a patch with your port of Gate.
> 
> I can definitely patch it, but given that the port is now fetching the
> latest version from git, it would make more sense to fix the Gate
> sources directly and I would simply fetch a newer properly working
> commit.
> 
> David, may I please ask to apply the above mentioned Jérôme's patch?
> 
> (If for whatever reason the sources cannot be updated in a few days, I
> will add the patch to the repository.)
> 
> Mojca
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users



More information about the Gate-users mailing list