Re: [ Linux ] maketx error in softimage
On 02/24/2013 03:23 PM, Stefan Andersson wrote: This will genarete a EXR file (in most other applications). Softimage only spits out this: maketx: /usr/Softimage/Softimage_2013_SP1/Application/bin/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by maketx) maketx: /usr/Softimage/Softimage_2013_SP1/Application/bin/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/libOpenImageIO.so.1.0) maketx: /usr/Softimage/Softimage_2013_SP1/Application/bin/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/libboost_regex-mt.so.5) These errors are related to gcc and the libstdc++.so.6 library and the version of gcc Softimage/OIIO was compiled with. what is the output of: # strings /usr/lib64/libstdc++.so.6 |grep GLIBCXX Regards, Mats Tegner
Re: [ Linux ] maketx error in softimage
I know, and it's damn hard to try and get the source code from Autodesk to recompile Softimage :) I think this is more a MainWin thing, which glibc that MainWin used to make Softimage. I have glibc versions 3.4 - 3.4.13. So all is working as it should, except when I'm inside Softimage. I wonder if there is a magic way to break free from the Softimage environment to be able to use the system environment. And devs.. for the next version that you release (which would be the first for the Singapore team). Make *sure* you are using the *same* python version and modules that Maya are using. Or I will... be very sad... regards stefan andersson On Sun, Feb 24, 2013 at 3:39 PM, Mats Bertil Tegner mats.bertil.teg...@gmail.com wrote: On 02/24/2013 03:23 PM, Stefan Andersson wrote: This will genarete a EXR file (in most other applications). Softimage only spits out this: maketx: /usr/Softimage/Softimage_2013_**SP1/Application/bin/libstdc++.**so.6: version `GLIBCXX_3.4.11' not found (required by maketx) maketx: /usr/Softimage/Softimage_2013_**SP1/Application/bin/libstdc++.**so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/libOpenImageIO.so.**1.0) maketx: /usr/Softimage/Softimage_2013_**SP1/Application/bin/libstdc++.**so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/libboost_regex-mt.**so.5) These errors are related to gcc and the libstdc++.so.6 library and the version of gcc Softimage/OIIO was compiled with. what is the output of: # strings /usr/lib64/libstdc++.so.6 |grep GLIBCXX Regards, Mats Tegner -- *Stefan Andersson | Digital Janitor* blog http://sanders3d.wordpress.com | showreelhttp://vimeo.com/sanders3d| twitter http://twitter.com/sanders3d | LinkedInhttp://www.linkedin.com/in/sanders3d| cell: +46-73-6268850 | skype:sanders3d
Re: [ Linux ] maketx error in softimage
On 02/24/2013 03:54 PM, Stefan Andersson wrote: I know, and it's damn hard to try and get the source code from Autodesk to recompile Softimage :) I think this is more a MainWin thing, which glibc that MainWin used to make Softimage. I have glibc versions 3.4 - 3.4.13. So all is working as it should, except when I'm inside Softimage. I wonder if there is a magic way to break free from the Softimage environment to be able to use the system environment. And devs.. for the next version that you release (which would be the first for the Singapore team). Make *sure* you are using the *same* python version and modules that Maya are using. Or I will... be very sad... regards stefan andersson Is there a /usr/lib64 directory inside the Softimage directory? If so, you could try to make a softlink to the system-wide version of libstdc++.so.6 Mats
Re: [ Linux ] maketx error in softimage
write out a script call that external script with Env=None and then that external script sticks os.environ into its popen Env ? On 24/02/2013 9:54 AM, Stefan Andersson wrote: I wonder if there is a magic way to break free from the Softimage environment to be able to use the system environment.
Re: [ Linux ] maketx error in softimage
I rather not since that might break softimage. And I would have to do that in each machine that has softimage. Regards Stefan On Feb 24, 2013, at 16:05, Mats Bertil Tegner mats.bertil.teg...@gmail.com wrote: On 02/24/2013 03:54 PM, Stefan Andersson wrote: I know, and it's damn hard to try and get the source code from Autodesk to recompile Softimage :) I think this is more a MainWin thing, which glibc that MainWin used to make Softimage. I have glibc versions 3.4 - 3.4.13. So all is working as it should, except when I'm inside Softimage. I wonder if there is a magic way to break free from the Softimage environment to be able to use the system environment. And devs.. for the next version that you release (which would be the first for the Singapore team). Make *sure* you are using the *same* python version and modules that Maya are using. Or I will... be very sad... regards stefan andersson Is there a /usr/lib64 directory inside the Softimage directory? If so, you could try to make a softlink to the system-wide version of libstdc++.so.6 Mats
Re: [ Linux ] maketx error in softimage
Hey Stefan, Indeed it has to do with the libstdc++ library, which handles stdout and your system's differs from that which Softimage was compiled with. No need to recompile a thing, though; merely to fool Softimage into loading the system one first. It uses the first one it finds in the *LD_LIBRARY_PATH* environment variable. The system one will be in there, but it's towards the end so it gets ignored. You can make it the first with something like this: import osimport subprocess weAreInLinux = Application.Platform.startswith(Linux) exe = r'c:\path\to\executable'if weAreInLinux: exe = r'/path/to/executable' ldEnv = LD_LIBRARY_PATH sysLibDir = /usr/lib64 ld_oldVal = os.environ[ldEnv] ldList = os.environ[ldEnv].split(:) for i, x in enumerate(ldList): if x == sysLibDir: del ldList[i] # Sometimes it's too low in the list. os.environ[ldEnv] = sysLibDir+:+os.environ[ldEnv] # So we make it first. command = exe+cmdArgs Application.LogMessage( 'Calling: ' + command ) proc = subprocess.Popen(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=os.path.dirname(exe)) out, err = proc.communicate()if weAreInLinux: os.environ[ldEnv] = ld_oldVal # Reset to old values, like a good samaritan. :p Application.LogMessage( Execution complete -- out: %s, return code: %s % (out, err) ) I had to do this for a commandline tool I was trying to call and it was giving me the same error. Hope it helps. Cheers! -- Alan ps: You may wanna write some extra code to catch exceptions when running the process. On Sun, Feb 24, 2013 at 10:18 AM, Stefan Andersson sander...@gmail.comwrote: I rather not since that might break softimage. And I would have to do that in each machine that has softimage. Regards Stefan On Feb 24, 2013, at 16:05, Mats Bertil Tegner mats.bertil.teg...@gmail.com wrote: On 02/24/2013 03:54 PM, Stefan Andersson wrote: I know, and it's damn hard to try and get the source code from Autodesk to recompile Softimage :) I think this is more a MainWin thing, which glibc that MainWin used to make Softimage. I have glibc versions 3.4 - 3.4.13. So all is working as it should, except when I'm inside Softimage. I wonder if there is a magic way to break free from the Softimage environment to be able to use the system environment. And devs.. for the next version that you release (which would be the first for the Singapore team). Make *sure* you are using the *same* python version and modules that Maya are using. Or I will... be very sad... regards stefan andersson Is there a /usr/lib64 directory inside the Softimage directory? If so, you could try to make a softlink to the system-wide version of libstdc++.so.6 Mats
Re: [ Linux ] maketx error in softimage
On Sun, Feb 24, 2013 at 10:18 AM, Stefan Andersson sander...@gmail.com wrote: I rather not since that might break softimage. And I would have to do that in each machine that has softimage. no, the point is that when you launch maketx from softimage, it inherits's softimage environment, so you should launch a shell script instead that will set the environment variable as appropriate and then launch maketx. That cannot break softimage, you're modifying the environment for a child process. processes are separate.
Re: [ Linux ] maketx error in softimage
Anyhow, solved it. Thanks Stephen for getting my brain on track. And thanks everyone else for chipping in! bash script #!/bin/sh export PATH=/usr/bin export LD_LIBRARY_PATH=/usr/lib64 maketx $1 --resize -o $2 Inside Softimage import subprocess script = /home/stefan/makenice.sh file_in = /home/stefan/test.jpg file_out = /home/stefan/test.jpg subprocess.Popen( %s %s %s % (script, file_in, file_out), shell=True) best regards stefan On Sun, Feb 24, 2013 at 4:35 PM, Luc-Eric Rousseau luceri...@gmail.comwrote: On Sun, Feb 24, 2013 at 10:18 AM, Stefan Andersson sander...@gmail.com wrote: I rather not since that might break softimage. And I would have to do that in each machine that has softimage. no, the point is that when you launch maketx from softimage, it inherits's softimage environment, so you should launch a shell script instead that will set the environment variable as appropriate and then launch maketx. That cannot break softimage, you're modifying the environment for a child process. processes are separate. -- *Stefan Andersson | Digital Janitor* blog http://sanders3d.wordpress.com | showreelhttp://vimeo.com/sanders3d| twitter http://twitter.com/sanders3d | LinkedInhttp://www.linkedin.com/in/sanders3d| cell: +46-73-6268850 | skype:sanders3d