"Could not find a match" error when passing parameter prefixed with "std::"

We're moving from Solaris 8 to Solaris 10, and I'm compiling our C/C++ applications using the Sun Studio 8 C++ compiler to verify that they'll still run correctly under Solaris 10.
All is well except for an error I'm getting on my Solaris 10 system but not on my Solaris 8 system.
Specifically, this line of code compiles correctly on both systems:
    if ( std::find_if(ident.begin(), ident.end(), is_not_alnum) != ident.end() )
        throw invalid_ident(caption, ident, code);but this line produces an error on Solaris 10 (but not on a Solaris 8 server):
    if ( std::find_if(ident.begin(), ident.end(), std::islower) != ident.end() )
        throw invalid_ident(caption, ident, code);The error returned is:
"auth_validate.C", line 140: Error: Could not find a match for std::find_if<std::InputIterator,
std::Predicate>(const char*, const char*, extern "C" int(int)).Clearly the "std::" prefix is involved... but why would this code compile successfully under Solaris 8 but fail under Solaris 10?
I've eliminated the usual suspects: the compiler is the same (including the include files) on both servers; there are no differences in the makefiles; there are no differences in the source code; all the referenced include directories exist on the Solaris 10 server.
At this point I'm stumped. My guess is that there's some environmental variable somewhere in Solaris 10 that is telling the Sun Studio 8 compiler to behave in a particular way (which Solaris 8 isn't telling the compiler), but I can't guess where such a thing might be occurring or what it might look like.
I've tried changing the source code to simply delete the "std::" prefix, and that code then compiles correctly on both my Solaris 8 and Solaris 10 servers. However, I'd very much prefer not to have to change any source code -- if this is an environmental issue with Solaris 10 affecting how the Sun Studio 8 C++ compiler behaves, I'd like to know about that.
If anyone can shed some light on this problem, or even propose additional tests I might try, I'd appreciate it!

clamage45, thanks very much for the response.
I'm looking into putting together a small example app. Meanwhile, I took your suggestion to check the patch levels of the two compiler instances and lo! there is a discrepancy.
The compiler installed on our Solaris 8 server reports itself from a CC -V command as "CC: Sun C++ 5.5 Patch 113817-19 2006/10/13", while the version on the Solaris 10 server reports as "CC: Sun C++ 5.5 2003/03/12". So although my eyeball comparison of the compiler's include files and libraries (including file sizes and timestamps) showed no differences, that was just a spot check; it wasn't the more "official" check that you helpfully suggested.
I've asked our sysadmin to look into this. No guarantees, of course, but I would not be surprised if patching the compiler on our Solaris 10 system resolved the problem. (Assuming we can find a version of the most recent patch for the Sun Studio 8 C++ compiler that's valid for Solaris 10.)
Regarding Sun Studio 8, we're definitely aware that it's reached its expiration date. We already have plans to transition to a more up-to-date version (probably Sun Studio 12) at a later date -- all I'm doing currently is testing to verify that the current application compiles and runs properly on Solaris 10. If possible, I'd like to get that working independently of any potential code changes driven by a significant compiler version upgrade.
Thanks again, and I'll add a new comment with additional information if our patching doesn't help.

Similar Messages

  • Sun C++ 5.13 SunOS_sparc Beta2 2014/06/17: Error: Could not find a match for std::_Tuple_impl 0, unsigned&& ::_Tuple_impl(std::tuple unsigned&& , unsigned) needed in std::tuple unsigned&& ::tuple unsigned, void (unsigned&&).

    I think I downloaded the latest Solaris Studio version.  When I compile my code, I got the following error:
    bash-3.00$ gmake -f Makefile.sun
    CC -c -o metadata.o metadata.cpp -I. -I.. -g -O0 -std=c++11 -I/export/home/oracle/zhifan/boost_1_55_0 -I/export/home/oracle/zhifan/instantclient_11_2/sdk/include -V
    CC: Sun C++ 5.13 SunOS_sparc Beta2 2014/06/17
    ccfe: Sun C++ 5.13 SunOS_sparc Beta2 2014/06/17
    "metadata.cpp", line 20: Warning: db hides databus::MetadataManager::db.
    "metadata.cpp", line 26: Warning: db hides databus::MetadataManager::db.
    Error: Could not find a match for std::_Tuple_impl<0, unsigned&&>::_Tuple_impl(std::tuple<unsigned&&>, unsigned) needed in std::tuple<unsigned&&>::tuple<unsigned, void>(unsigned&&).
    "/export/home/oracle/zhifan/SolarisStudio12.4-beta_jul14-solaris-sparc/lib/compilers/CC-gcc/include/c++/4.8.2/tuple", line 868:     Where: While instantiating "std::tuple<unsigned&&>::tuple<unsigned, void>(unsigned&&)".
    "/export/home/oracle/zhifan/SolarisStudio12.4-beta_jul14-solaris-sparc/lib/compilers/CC-gcc/include/c++/4.8.2/tuple", line 868:     Where: Instantiated from std::forward_as_tuple<unsigned>(unsigned&&).
    "/export/home/oracle/zhifan/SolarisStudio12.4-beta_jul14-solaris-sparc/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_map.h", line 485:     Where: Instantiated from non-template code.
    1 Error(s) and 2 Warning(s) detected.
    gmake: *** [metadata.o] Error 2
    with the same code, It can be compiled with g++ on Linux platform.
    1 Is the issue same as 12.4 Beta, Error: Could not find a match for std::_Tuple_impl<0, std::string &&>::_Tuple_impl(std::tuple<std::string &&> ?
    2 Do we have any workaround for this issue?
    3 When will the final 12.4 release  be available?

    I can't say for sure whether your problem is fixed in the final release without a test case, but I'd say the chances are very good.
    The final release will be announced soon. Watch this space, or the Oracle Solaris Studio page for an announcement.

  • 12.4 Beta, Error: Could not find a match for std::_Tuple_impl 0, std::string && ::_Tuple_impl(std::tuple std::string &&

    Hi,
    would you guys say code that compiles fine without -std=c++11 should also compile *with* -std=c++11?
    raider@sol112_x86:/tmp $ CC -V
    CC: Sun C++ 5.13 SunOS_i386 Beta2 2014/06/17
    raider@sol112_x86:/tmp $ CC buggy.cc  
    raider@sol112_x86:/tmp $ CC -std=c++11 buggy.cc         
    Error: Could not find a match for std::_Tuple_impl<0, std::string &&>::_Tuple_impl(std::tuple<std::string &&>, std::string ) needed in std::tuple<std::string &&>::tuple<std::string, void>(std::string &&).
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/tuple", line 868:     Where: While instantiating "std::tuple<std::string &&>::tuple<std::string, void>(std::string &&)".
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/tuple", line 868:     Where: Instantiated from std::forward_as_tuple<std::string>(std::string &&).
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_map.h", line 485:     Where: Instantiated from non-template code.
    1 Error(s) detected.
    raider@sol112_x86:/tmp $ cat buggy.cc
    #include <map>
    #include <string>
    typedef std::map<std::string, std::string> StrStrMap;
    int main(void)
        StrStrMap dict;
        dict["bug"] = "feature";
        return 0;

    C++11 is approximately a superset of C++03. If you write in the common subset, the code will compile in any mode. For example, a basic hello-world program
    #include <iostream>
    int main() { std::cout << "Hello, world!\n"; }
    will compile and run as C++98/03, as C++11, as C++14, and I'm sure will also work with the next standard, planned for 2017.
    But if you use syntax or library types and functions that are new in C++11, the code will not compile as C++03.
    In my previous post, I might have sounded too negative about compiling C++03 code in C++11 mode. If you have a C++03 program that is intended to be portable, and that works with different compilers on different platforms, chances are good that it will continue to work in C++11. The chances are very good that only minor modifications will be needed.

  • Error: Could not find a match for... ?

    Hi,
    I am trying to compile some code using Studio 10/11 which appears to compile cleanly using a bunch of different C++ compilers (xlC, aCC, VC, g++) but is failing using the C++ compiler in both Studio 10 and Studio 11 with:
    "test.cpp", line 18: Error: Could not find a match for MKGeomT::getDistanceSquared<MKGeomT::_DIM, MKGeomT::_TYPE>(const MKGeomT::Segment<MKT::Dim2, MKT::Double>&, const MKGeomT::Point<MKT::Dim2, MKT::Double>&, MKGeomT::Point<MKT::Dim2, MKT::Double>*, double*).
    "test.cpp", line 23: Error: Could not find a match for MKGeomT::getDistanceSquared<MKGeomT::_DIM, MKGeomT::_TYPE>(const MKGeomT::Segment<MKT::Dim3, MKT::Double>&, const MKGeomT::Point<MKT::Dim3, MKT::Double>&, MKGeomT::Point<MKT::Dim3, MKT::Double>*, double*).
    Any ideas on how to get this to compile would be appreciated.
    test.cpp:
    /opt/SUNWspro/bin/CC -library=stlport4 -c test.cpp
    #include "all.h"
    namespace MKGeomT
    template < class DIM, class TYPE >
    double getDistanceSquared(Segment < DIM, TYPE > const &segment,
    Point < DIM, TYPE > const &querypt,
    Point < DIM, TYPE > *closestpoint,
    double *param)
    { return 0.0; }
    template double getDistanceSquared < MKT::Dim2 > (Segment2 const &segment,
    Point2 const &querypt,
    Point2 *closestpoint,
    double *param);
    template double getDistanceSquared < MKT::Dim3 > (Segment3 const &segment,
    Point3 const &querypt,
    Point3 *closestpoint,
    double *param);
    all.h:
    // a.h
    namespace MKGeomT
    template < class DIM, class TYPE > class Point;
    template < class DIM, class TYPE > class Segment;
    template < class DIM, class TYPE >
    double getDistanceSquared(Segment < DIM, TYPE > const &segment,
    Point < DIM, TYPE > const &point,
    Point < DIM, TYPE > closestpoint /= 0*/,
    double *param = 0);
    template < class DIM, class TYPE >
    inline double getDistance(Segment < DIM, TYPE > const &segment,
    Point < DIM, TYPE > const &point,
    Point < DIM, TYPE > *closestpoint = 0)
    return 0.0;
    // b.h
    namespace MKT
    class Dim2 { public: enum { NUM_DIM = 2 }; };
    class Dim3 { public: enum { NUM_DIM = 3 }; };
    class Float { public: typedef float  Stor_t; typedef double Calc_t; };
    class Double { public: typedef double Stor_t; typedef double Calc_t; };
    } // end of namespace MKT
    // c.h
    using MKT::Dim2;
    using MKT::Dim3;
    using MKT::Double;
    namespace MKGeomT
    template < class DIM, class TYPE >
    class PointBase
    template < class DIM, class TYPE > class Point;
    #if 1
    template < class _TYPE >
    class Point < Dim2, TYPE > : public PointBase < Dim2, TYPE >
    template < class _TYPE >
    class Point < Dim3, TYPE > : public PointBase < Dim3, TYPE >
    #endif
    typedef Point < Dim2, Double > Point2;
    typedef Point < Dim3, Double > Point3;
    } // end of namespace MKGeomT
    // d.h
    namespace MKGeomT
    /*! The Segment is a geometry class storing a segment in 3-D. Things
    like the segment vector and length are cached behind the
    scenes so subsequent retrieval is a no-op. */
    template < class DIM, class TYPE = MKT::Double >
    class Segment
    template < class DIM, class TYPE >
    double getDistanceSquared (Segment < DIM, TYPE > const &rkSeg0,
    Segment < DIM, TYPE > const &rkSeg1,
    double* pfSegP0 = 0,
    double* pfSegP1 = 0);
    template < class DIM, class TYPE >
    double getDistanceSquared2(Segment < DIM, TYPE > const &rkSeg0,
    Segment < DIM, TYPE > const &rkSeg1,
    double* pfSegP0 = 0,
    double* pfSegP1 = 0);
    typedef Segment < MKT::Dim2, MKT::Double > Segment2;
    typedef Segment < MKT::Dim3, MKT::Double > Segment3;
    thanks,
    k.m

    Never mind, I see that you intended to include b.h, c.h, and d.h in all.h.
    Many compilers do not look at template code until the code is instantiated. This code consists only of declarations, with little that can be instantiated. It's possible that other compilers would also complain about this code if they got to the point of processing all the template declarations.
    Can you add some instantiations along with template definitions and a main function so that the code can be compiled and linked?

  • Can anyone tell me what "Could not find namespace: AgCreativeCloudUtils" means when I hit the Import button?

    Can anyone tell me what "Could not find namespace: AgCreativeCloudUtils" means when I hit the Import button in Lightroom? Thanks

    It means you're hitting a bug.
    Consider filing a bug report here:
    New topic for Photoshop Family
    (along with pertinent information like OS & Lr version, plus conditions which it occurs AND conditions in which it does NOT occur, if you can find any).
    Maybe somebody else with more specific knowledge or experience will be more help.
    Good luck,
    Rob

  • TS4036 could not sign in server error when trying to restore iphone from icloud

    I am trying to restore my iPhone from an iCloud  backup.  I deleted everything on the phone per restore instructions. Connected to wireless on iPhone.  Logged on to my iCloud account.    Told the iPhone to restore from iCloud backup.  I keep getting ""could not sign in" server error OK.  I get this messge over and over.

    I actually noticed when I had this problem just now that my iPhone 4 wasn't on wif. Only connected to 3G even though I entered my network info and clicked connect. So I backed up a few steps and re selected to connect to wifi and it fixed my issue!

  • Could not find language file error message

    I connected without problems to the login screen last night, but when I tried to log in to a session on my computer, I got this message:
    Could not find language file https://arkadinoneplace-ah.adobeconnect.com/common/meetingAS3/lang/breezeopenmeetingstring s-en.xml --- https://arkadinoneplace-ah.adobeconnect.com/common/meetingAS3/launcher/launcher.swf
    I could connect and login on 2 other computers in the house, so didn't miss the session, but want to be able to use my computer in future. The session was in English and my set language is English (Australia), as the meeting room and I are both in Sydney.
    Any ideas on what is wrong with my computer settings? I am using Windows 7. I checked that the Explorer settings are the same in the computers that worked.

    We had the same problem with one user, here is the article she followed to fix the problem. http://support.mozilla.org/en-US/kb/flash-113-doesnt-load-video-firefox?s=video+doesn%27t+ work+in+firefox&r=0&e=es&as=s Might not be the same scenario for you but thought it might be of help.

  • Could not find (UNC path) Error

    I have a few machines (not all machines) with a single interface that get an error on a bundle, "Unexpected error installing file. Error: Could not find the directory \\172.16.8.34\installs$\ENH-Source", however, from that machine I can manually access that UNC path from a Run line and see the contents just fine. So, what gives?

    Debug log on one offending machine simply says:
    Code:
    [DEBUG] [11/30/2014 23:35:08.893] [1344] [ZenworksWindowsService] [25] [] [Copy Directory] [] [Source directory \\172.16.8.34\installs$\ENH-Source does not exist.] [] []
    [DEBUG] [11/30/2014 23:35:08.905] [1344] [ZenworksWindowsService] [25] [FLastname] [ActionManager] [] [Action handler Copy Directory Action finished processing Copy ENH Source with error: GenericActions.UnexpectedError.] [] []
    But it does exist, and the user can UNC to the path. Again, if the problem was system unable to access the path, I would expect many more (all) my other workstations generating the same error. I do see that the workstation has 2 IP addresses, a 172.16 address which would have access and a 192.168 address that wouldn't be able to. I also see:
    Code:
    The agent service is running, but the request failed for one or more known addresses.
    It's feasible that it's trying to access the path from 192.168 interface and failing, but shouldn't it try/know to use the 172.16 interface?

  • Could not find the main class JRE 1.6 only with console program into Contro

    Hi,
    I want replace JRE1.5-11 with JRE 1.6.
    Applet is running correctly with JRE 1.6.
    But when i want launching Java program located into "Parameters/Control Panel"
    I have following error message "Could not find the main class JRE 1.6 "
    Regards
    Philippe

    i wouldn't report a nullpointer to sun unless you're fairly confident there's some sort of bug. if main() can't be found it sounds to me like a config issue. if nullpointer, sounds like a code issue. post the code if you want, but i don't think sun will help you debug this.

  • CLI156 Could not start domain domain1 error when J2ee is installed

    Whenever I install J2ee 1.4 sdk the first time the application server starts and everything works fine. But when the system is restarted and the server is started again i get the above mentioned error.
    Domain domina1 failed to startup. Could not start domain domain1. I have installed and uninstalled the application many times but yet I am experiencing the same error.
    Please give me a solution to this error asap.
    Thanks,
    Poonam

    Did you check server log for the exact cause of startup failure? One thing that is possible is that some of the ports associated with server listeners start being used by other processes after system restart (it seems that Windows use ports in 10xx range for remote drive mappings - so that might be one area where you might run into issues). If so, changing server port numbers might help. In any case, check logs for the exact cause of error .

  • "Could not find the main class" when running a jar

    Hi, I'm trying to create and run a jar from my application, but I can't figure out how to properly set an entry-point. Looking at the Java Tutorials http://java.sun.com/docs/books/tutorial/deployment/jar/index.html I still can't get it to work.
    I have a directory myApp, which contains a directory images and some class files, including mainClass.class. I also have a manifest Manifest.txt in the directory myApp with the following line:
    Main-Class: mainClass.class
    + one empty line
    I create a jar successfully, while inside the myApp directory, with the following command:
    jar cfm myApp.jar Manifest.txt *.class images\*.*
    I then proceed to run the jar with the following command:
    java -jar myApp.jar
    and receive the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: myApp/class
    My completely uneducated guess is that there is something wrong with my manifest. The tutorial says that the line should be:
    Main-Class: MyPackage.MyClass
    I'm assuming that I get the error because I didn't specify a package, which I didn't do because I didn't know what to put there. Do I even have a package?
    Can anyone tell me what I've done wrong? thanks.
    Message was edited by:
    SmurfZG

    One problem is you are specifying a file name instead of a class name. It probably should beMain-Class: mainClassA good test is to run your app before jaring it - if you run it with "java mainClass" then the Main-Class attribute must be mainClass.
    Also class naming conventions say that class names should start with a capital letter - MainClass for example. It is just a convention, but it is easier to get help when you follow conventions.

  • I could not find my order even when I received an email that my order was filled?

    It is so problematic!  I can't find my order and I can't download to install.

    Contact support directly by phone or web chat.
    Mylenium

  • Eclipse give following error :could not find Java 2 runtime environment

    When I try to start eclipse it is giving me following error could not find Java 2 runtime environment.It was working fine untill I installed a new verson of eclipse although I am not whethar that is the source of problem.
    When i give java -version command in command prompt it shows
    Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
    has value '1.4', but '1.6' is required.
    Error: could not find java.dll
    Error: could not find Java 2 Runtime Environment.
    My java Home ,classpath , and path are all set as I say it was earliar woking fine.
    Please Help.

    I know this is a relatively old post, but some people can stumble on this page when doing a search for this problem.
    Anyway, I ran into this on my PC after I installed Sybase which had an older jre.
    Solution:
    1. Run regedit
    2. Look for Java Runtime Environment
    You may have to do multiple searches. Eventually you'll find one with the version number.
    3. Modify the value and change it to the correct version number. (in your case, you would have changed it from 1.4 to 1.6).
    This is much quicker than reinstalling Java every time installing something that uses an older version of Java hoses up the registry value.

  • Intermittent errors - Invoke() could not find the Service name

    Users are getting intermittent error : Invoke() could not find the Service name, when opening the Xcelsius dashboards in PRODUCTION. The dashboard has several QAAW queries .These errors are poping up intermittently.
    The dashboards are hosted utside the BO environment.
    BOXIR3.1
    Crystal Xcelsius 2008 Enterprise

    As I continue to look into it, the only thing that I see differently when I am prompted for login is that I can specify the system to log into. I am now wondering if somehow this information is being lost and that is what is causing these issues. Given that the specified name cannot be found and that it does in fact recognize the correct name, I'm not entirely sure what the problem is.
    Further information:
    If I disable the use of hard-coded logins and I am prompted, I can display results for the onLoad run. Yet the query is also set to refresh on 30 second intervals. On every subsequent interval I am getting this error.
    I think this has something to do with sessions. How do I check which sessions exist on my box? CmcApp somewhere?
    Edited by: Brian Comeau on Jun 4, 2009 12:24 AM
    Checking in CmcApp I found some sessions. Here is what happens:
    Login to CmcApp Sessions tab
    -Administrator: 1 session at 5:45pm
    Launch browser to Xcelsius .swf
    Prompted for login information: Administrator/password
    -Administrator: 2 sessions at 6:30pm
    I had previously set the timeout for sessions in QaaWS to 120 seconds
    After 2 minutes
    -Administrator: 1 session at 5:45pm
    Yet throughout this time, I am still given this "invoke() could not find the service name" error. The name provided "qaawsIncidents" is the same name that I can see if I launch QaaWS.
    Ideas?
    Edited by: Brian Comeau on Jun 4, 2009 12:30 AM

  • Could not find the main class. Program will exit!

    I have created many Executable Jar files before, and this one I did the same. When I run the jar file, (Clicking on it) I get the "Could not find the main class. Program will exit!" error message. When I run the jar file through DOS I get this Stack trace:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/ControllerListener
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
    Any Ideas? I did a search on google, and looks like others have had this problem but found no answer.
    US101

    There could be several reasons for getting this "Could not find main class" error message. From your stack trace it looks like the class javax/media/ControllerListener is not in your class path. Make sure your manifest file has a line like this:
    Class-Path: pathToTheJarFileWithControllerListenerClass.jar otherJars.jar
    This error message is also generated whenever any static initialization errors out giving the misleading error message implying that there is something wrong with the main class. Prior to starting your main class, static initialization of any static variables takes place. In my case, I was initializing a resource bundle, and forgot to include the property file in my building of the jar file. Well this failed of course and the generic error message appeared. It took many long hours to figure out it didn't have anything to do with the manifest file or the main class itself.
    HTH,
    John Bender

Maybe you are looking for