Skip to content

Commit

Permalink
Add Please delete or regenerate sys.{so,dll,dylib}'' to all the error…
Browse files Browse the repository at this point in the history
… messages
  • Loading branch information
Keno committed Mar 20, 2014
1 parent c90c0af commit 509b419
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,23 @@ static void jl_load_sysimg_so(char *fname)
globalUnique = *(size_t*)jl_dlsym(sysimg_handle, "jl_globalUnique");
const char *cpu_target = (const char*)jl_dlsym(sysimg_handle, "jl_sysimg_cpu_target");
if (strcmp(cpu_target,jl_cpu_string) != 0)
jl_error("Julia and the system image were compiled for different architectures.");
jl_error("Julia and the system image were compiled for different architectures."
"Please delete or regenerate sys.{so,dll,dylib}.");
uint32_t info[4];
cpuid((int32_t*)info, 1);
if (strcmp(cpu_target,"native") == 0)
{
uint64_t saved_cpuid = *(uint64_t*)jl_dlsym(sysimg_handle, "jl_sysimg_cpu_cpuid");
if (saved_cpuid != (((uint64_t)info[2])|(((uint64_t)info[3])<<32)))
jl_error("Target architecture mismatch. Please regenerate sys.{so,dll,dylib}.");
jl_error("Target architecture mismatch. Please delete or regenerate sys.{so,dll,dylib}.");
} else if(strcmp(cpu_target,"core2") == 0) {
int HasSSSE3 = (info[3] & 1<<9);
if (!HasSSSE3)
jl_error("The current host does not support SSSE3, but the system image was compiled for Core2.\n"
"Please delete or regenerate sys.{so,dll,dylib}.");
} else {
jl_error("System image has unknown target cpu architecture.");
jl_error("System image has unknown target cpu architecture."
"Please delete or regenerate sys.{so,dll,dylib}.");
}
}
else {
Expand Down

3 comments on commit 509b419

@StefanKarpinski
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't these going to look funny without spaces between the sentences?

@Keno
Copy link
Member Author

@Keno Keno commented on 509b419 Mar 20, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. I forgot the \n.

@nalimilan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And while you're at it, CPU would be better than cpu. ;-)

Please sign in to comment.