Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] [sm-discuss] Steps to change architecture (optimize options).

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Javier Vasquez <j.e.vasquez.v AT gmail.com>
  • To: "sm, discuss" <sm-discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] [sm-discuss] Steps to change architecture (optimize options).
  • Date: Mon, 21 Jan 2013 03:54:55 +0000

On Mon, Jan 21, 2013 at 2:53 AM, Javier Vasquez <j.e.vasquez.v AT gmail.com>
wrote:
> On Sun, Jan 20, 2013 at 7:43 PM, Sukneet Basuta <sukneet AT gmail.com> wrote:
>> On Sun, Jan 20, 2013 at 4:55 PM, Javier Vasquez <j.e.vasquez.v AT gmail.com>
>> wrote:
>>> Hi,
>>>
>>> I wanted to change architecture from x86_64 to corei7_avx (core i7
>>> with sandy bridge), so that new casted spells became further
>>> optimized.
>>>
>>> However doing that without any further actions proved wrong.
>>>
>>> When getting binutils re-casted (new version showing up on test), it
>>> actually re-compiled and installed OK, but then gcc got broken unable
>>> to generate executables at the "configure"stage of compilation...
>>> Specially gettext no longer was able to compile...
>>
>> Does setting your architecture to native result in the same problem? I
>> suggest you just stick to native either way. It will choose the best
>> optimizations for your architecture. Be aware, however, that
>> native-x86_64-64 does not force -fpic and -dpic flags (while every
>> other x64 arch in Source Mage does), so you may run into a few
>> programs complaining about it. I've fixed it in every spell I've
>> found, but I didn't test every spell. It's mainly only old programs
>> that have issues though. If you don't mind using pic, just specify
>> those additional flags when you select your architecture.
>>
>>> I remember before doing "sorcery -r" after recent installation, and
>>> after changing optimization flags, it's recommended to:
>>>
>>> 1.- re-cast linux.
>>> 2.- re-cast gcc, g++, perl, gettext, glibc.
>>> 3.- run sorcery -r
>>>
>>> I'm wondering if the order is OK... Also if binutils shouldn't be
>>> re-casted, in some particular order as well.
>>
>> I always follow the order listed at
>> http://www.sourcemage.org/projects/source-mage/wiki/InstallGuide#Post-Install
>>
>>> Any ways. I wanted to do the same for a pentium-m machine, which was
>>> originally set as i686, and I moved it recently to pentium-m, but I'll
>>> move it back to i686 so I can update it...
>>>
>>> Let me know id those steps are adequate, or if they require changes.
>>> Is "sorcery -r" totally required? Or are there a smaller list of
>>> spells required to be re-casted and that would be it?
>>
>> It shouldn't be. AFAIK you can compile pretty much any program with
>> different optimizations and they should work. binutils is a pretty
>> crucial package though and everything relies on it, so maybe its the
>> exception. That said, the wiki recommends casting binutils and gcc
>> first after selecting your architecture. I have done that quite a few
>> times and I've never broke gcc. I suspect the culprit is incorrect
>> optimization flags.
>
> K,
>
> I was missing just binutils in the front, :-) I got that list from a
> pretty old wiki about installing sourcemage, :-)
>
> BTW, I haven't changed architecture yet, and I've recompiled "binutils
> gcc g++ perl gettext glibc" many times now (well binutils just a few
> times), and I don't get to fix the error on python, which always faisl
> to compile with:
>
> /usr/lib/libstdc++.so.6: undefined reference to `libintl_bindtextdomain'
>
> And some other libstdc++.so.6 libintl_* errors. As all these spells
> were never compiled with the new architecture, the change (which only
> had around one week), and reverting it, doesn't seem like what's
> causing the issue. From:
>
> http://wiki.sourcemage.org/FrequentlyAskedQuestions/Usage
>
> It's suggested to recompile glibc, which I did, but didn't work. I
> then repeated several times the sequence, and python never gets fixed,
> :-(
>
> Not sure if I should think about reverting binutils and recompile the
> sequence and see if then python gets to compile... Strangely enough,
> python3 doesn't find problems, but it might it sure doesn't depend
> upon the same stuff...
>
> Any ideas for this one?
>
> Thanks,
>
> --
> Javier.

I'm always getting this error:

gcc -pthread -shared -O3 -o libpython2.7.so Modules/getbuildinfo.o
Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o
Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o
Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o
Parser/tokenizer.o Objects/abstract.o Objects/boolobject.o
Objects/bufferobject.o Objects/bytes_methods.o
Objects/bytearrayobject.o Objects/capsule.o Objects/cellobject.o
Objects/classobject.o Objects/cobject.o Objects/codeobject.o
Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o
Objects/exceptions.o Objects/genobject.o Objects/fileobject.o
Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o
Objects/intobject.o Objects/iterobject.o Objects/listobject.o
Objects/longobject.o Objects/dictobject.o Objects/memoryobject.o
Objects/methodobject.o Objects/moduleobject.o Objects/object.o
Objects/obmalloc.o Objects/rangeobject.o Objects/setobject.o
Objects/sliceobject.o Objects/stringobject.o Objects/structseq.o
Objects/tupleobject.o Objects/typeobject.o Objects/weakrefobject.o
Objects/unicodeobject.o Objects/unicodectype.o Python/_warnings.o
Python/Python-ast.o Python/asdl.o Python/ast.o Python/bltinmodule.o
Python/ceval.o Python/compile.o Python/codecs.o Python/errors.o
Python/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o
Python/getcompiler.o Python/getcopyright.o Python/getplatform.o
Python/getversion.o Python/graminit.o Python/import.o
Python/importdl.o Python/marshal.o Python/modsupport.o
Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o
Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pymath.o
Python/pystate.o Python/pythonrun.o Python/random.o
Python/structmember.o Python/symtable.o Python/sysmodule.o
Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o
Python/dtoa.o Python/formatter_unicode.o Python/formatter_string.o
Python/dynload_shlib.o Python/thread.o Modules/config.o
Modules/getpath.o Modules/main.o Modules/gcmodule.o
Modules/threadmodule.o Modules/signalmodule.o Modules/posixmodule.o
Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o
Modules/_codecsmodule.o Modules/_weakref.o Modules/zipimport.o
Modules/symtablemodule.o Modules/xxsubtype.o -lpthread -ldl -lutil
-lm ; \
fi
g++ -O3 -Xlinker -export-dynamic -o python \
Modules/python.o \
-L. -lpython2.7 -lpthread -ldl -lutil -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib/libstdc++.so:
undefined reference to `libintl_gettext'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib/libstdc++.so:
undefined reference to `libintl_textdomain'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib/libstdc++.so:
undefined reference to `libintl_bindtextdomain'
collect2: ld returned 1 exit status
make: *** [python] Error 1
! Problem Detected !

I'm casting 2.22 binutils, to see if it's a problem with ld (from
binutils)... Crossing fingers that's the problem, :-)

Thanks,

--
Javier.




Archive powered by MHonArc 2.6.24.

Top of Page