Prof A Olowofoyeku wrote:
Program received signal SIGSEGV, Segmentation fault. 0x77c47a64 in strncmp () (gdb) bt #0 0x77c47a64 in strncmp () #1 0x0040f24d in update_path (path=0x0, key=0x4191f7 "GCC") at ../../gcc/prefix.c:256 #2 0x0040284f in add_prefix (pprefix=0x415024, prefix=0x0, component=0x0, priority=1, require_machine_suffix=0, warn=0x0, os_multilib=0) at ../../gcc/p/gpc.c:3207 #3 0x0040898e in process_command (argc=2, argv=0x3d2588) at ../../gcc/p/gpc.c:3888
It seems that someting is wrong already in `process_command' (`prefix' in call to `add_prefix' definitely should be not 0). Could you try the following patch and post the results. The patch should print some relevant info and exit cleanly (if it still crashes you could wrap every `fprintf' in an `if' like the first one).
--- gpc.c.bb Sun Feb 20 21:27:53 2005 +++ gpc.c Sun Feb 20 21:41:48 2005 @@ -3840,6 +3840,12 @@ gcc_libexec_prefix = standard_libexec_prefix; #ifndef VMS /* FIXME: make_relative_prefix doesn't yet work for VMS. */ + if (gcc_exec_prefix) + fprintf(stderr, "gcc_exec_prefix=%s", gcc_exec_prefix); + else + fprintf(stderr, "gcc_exec_prefix is null\n"); + fflush(0); + if (!gcc_exec_prefix) { gcc_exec_prefix = make_relative_prefix (argv[0], standard_bindir_prefix, @@ -3885,6 +3891,17 @@ }
set_std_prefix (gcc_exec_prefix, len); + fprintf(stderr, "standard_bindir_prefix=%s\n", standard_bindir_prefix); + fprintf(stderr, "standard_libexec_prefix=%s\n", standard_libexec_prefix); + fprintf(stderr, "argv[0]=%s\n", argv[0]); + fprintf(stderr, "gcc_exec_prefix=%s\n", gcc_exec_prefix); + if (gcc_libexec_prefix) + fprintf(stderr, "gcc_libexec_prefix=%s\n", gcc_libexec_prefix); + else + fprintf(stderr, "gcc_libexec_prefix is null\n"); + fflush(0); + if (!gcc_libexec_prefix) + exit(1); add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 0); add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC",