Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302626 - app-portage/eix-0.19.2 fails to compile on IRIX
Summary: app-portage/eix-0.19.2 fails to compile on IRIX
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: High normal
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-28 13:09 UTC by Stuart Shelton
Modified: 2010-02-04 23:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for includes and ambiguity (eix-0.19.2-compilation-fixes.patch,1006 bytes, patch)
2010-01-28 19:38 UTC, Martin Väth
Details | Diff
Fix missing include in ebuild-exec (eix-0.19.2-ebuild-exec.patch,390 bytes, patch)
2010-01-29 12:56 UTC, Martin Väth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2010-01-28 13:09:28 UTC
The files src/eixTk/varsreader.cc and src/eix-update.cc both need to "#include <unistd.h>" (for close() and fchown() respectively).

However, even with these two fixes the build then fails with:

cc-1282 CC: ERROR File = eix-update.cc, Line = 671
  More than one instance of overloaded function "std::basic_string<char,
          std::char_traits<char>, std::allocator<char>>::insert" matches the
          argument list.

            Function symbol function "std::basic_string<char,
                      std::char_traits<char>,
                      std::allocator<char>>::insert(std::basic_string<char,
                      std::char_traits<char>,
                      std::allocator<char>>::size_type,
                      std::basic_string<char, std::char_traits<char>,
                      std::allocator<char>>::size_type, char)" is ambiguous by
                      inheritance.
            Function symbol function "std::basic_string<char,
                      std::char_traits<char>,
                      std::allocator<char>>::insert(std::basic_string<char,
                      std::char_traits<char>, std::allocator<char>>::iterator,
                      std::size_t, char)" is ambiguous by inheritance.
            The argument types are:  (int, int, char).
            TERNAL;"object type is: std::string
                                msg.insert(0, 1, ' ');
                                    ^

1 error detected in the compilation of "eix-update.cc".
CC ERROR:  /usr/lib32/cmplrs/fecc returned non-zero status 2
make[2]: *** [eix-update.o] Error 2
make[2]: Leaving directory `/usr/opt/gentoo/var/tmp/portage/app-portage/eix-0.19.2/work/eix-0.19.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/opt/gentoo/var/tmp/portage/app-portage/eix-0.19.2/work/eix-0.19.2'
make: *** [all] Error 2
Comment 1 Martin Väth 2010-01-28 19:38:09 UTC
Created attachment 217763 [details, diff]
Fix for includes and ambiguity

Thanks for the report. Due to the reorganization of the includes it is not so
surprising that I forgot some, but I hope that this reorganization will help to
avoid such problems in future.
The ambiguity message is a bit surprising, since I did not expect that a 0
could be cast as a string::iterator
Does the attached patch fix all problems?
Comment 2 Stuart Shelton 2010-01-29 11:15:49 UTC
Well, at least with the patch we break in different places ;)

  CXX    cache/common/ebuild_exec.o
cc-1367 CC: ERROR File = cache/common/ebuild_exec.cc, Line = 142
  A pointer to an incomplete class type is not allowed.

                if(!(base->portagesettings->export_portdir_overlay))
                     ^

cc-1323 CC: ERROR File = cache/common/ebuild_exec.cc, Line = 149
  No operator "[]" matches these operands.

            The operand types are:  PortageSettings [ const char [16] ].
                env["PORTDIR_OVERLAY"] = (*(base->portagesettings))["PORTDIR_OVERLAY"].c_str();
                                                                   ^

2 errors detected in the compilation of "cache/common/ebuild_exec.cc".
make[2]: *** [cache/common/ebuild_exec.o] Error 2
make[2]: Leaving directory `/usr/opt/gentoo/var/tmp/portage/app-portage/eix-0.19.2/work/eix-0.19.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/opt/gentoo/var/tmp/portage/app-portage/eix-0.19.2/work/eix-0.19.2'
make: *** [all] Error 2

(The indicator on the second ERROR there is below the opening square-bracket of '["PORTDIR_OVERLAY"]')

I'm not sure if this might help for the first of these issues:

http://forums.nekochan.net/viewtopic.php?f=15&t=1574161&start=15
Comment 3 Martin Väth 2010-01-29 12:56:22 UTC
Created attachment 217832 [details, diff]
Fix missing include in ebuild-exec

Thanks. I guess this is just another missing #include.
(The code which needs the include is not compiled on system which have setenv(),
and therefore I did not test it...)

The attached patch (together with the previous one) should now make eix compile
or lead to the next error message... :)
Comment 4 Stuart Shelton 2010-01-29 16:11:52 UTC
Looks as if there's one last instance: src/cache/cdb/cdb.cc also needs <unistd.h> for close().

After that, the only (non-fatal) build warning left is:

  CXX    versionsort.o
cc-3604 CC: WARNING File = versionsort.cc, Line = 43
  missing return statement at end of non-void function "parse_version"

  }
  ^


But with that small caveat, all seems fine! :)
Comment 5 Martin Väth 2010-01-29 18:07:22 UTC
(In reply to comment #4)
>   missing return statement at end of non-void function "parse_version"

The compiler does not understand that after exit() no return is needed;
I restructured the corresponding code so that exit() is in a conditional.

All changes discussed so far are now in eix svn trunk. Thanks for your help.
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-02-04 15:22:38 UTC
0.20.0 is in the tree, will hit prefix tree in a few. Thanks.
Comment 7 Stuart Shelton 2010-02-04 23:01:34 UTC
0.20.0 built and worked correctly without modification.  Thanks!