Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error C1189: #error: Unsupported CPU! #1049

Closed
LaughingAngus opened this issue Aug 28, 2020 · 5 comments
Closed

fatal error C1189: #error: Unsupported CPU! #1049

LaughingAngus opened this issue Aug 28, 2020 · 5 comments

Comments

@LaughingAngus
Copy link

visual studio 2017 with cmake compile problem:
\aeron-client\src\main\c\util/aeron_platform.h(31): fatal error C1189: #error: Unsupported CPU!

@tmontgomery
Copy link
Contributor

You will need to make sure you have VS setup for x64.

@LaughingAngus
Copy link
Author

I assign the machine to X64, and it works. However, another problem pops up in project Ping and PingPong:
hdr_histogram_static.lib(hdr_histogram.obj) : error LNK2019: unresolved external symbol __imp_floor, referenced in function hdr_calculate_bucket_config

Ping.cpp:
hdr_histogram *histogram; hdr_init(1, 10 * 1000 * 1000 * 1000LL, 3, &histogram);

hdr_histogram.c
`
int hdr_init(
int64_t lowest_trackable_value,
int64_t highest_trackable_value,
int significant_figures,
struct hdr_histogram** result)
{
int64_t* counts;
struct hdr_histogram_bucket_config cfg;
struct hdr_histogram* histogram;

int r = hdr_calculate_bucket_config(lowest_trackable_value, highest_trackable_value, significant_figures, &cfg);
...

}

int hdr_calculate_bucket_config(
int64_t lowest_trackable_value,
int64_t highest_trackable_value,
int significant_figures,
struct hdr_histogram_bucket_config* cfg)
{
...
largest_value_with_single_unit_resolution = 2 * power(10, significant_figures);
sub_bucket_count_magnitude = (int32_t) ceil(log((double)largest_value_with_single_unit_resolution) / log(2));
cfg->sub_bucket_half_count_magnitude = ((sub_bucket_count_magnitude > 1) ? sub_bucket_count_magnitude : 1) - 1;

cfg->unit_magnitude = (int32_t) floor(log((double)lowest_trackable_value) / log(2));
...

}
`

@LaughingAngus
Copy link
Author

I assign the machine to X64, and it works. However, another problem pops up in project Ping and PingPong:
hdr_histogram_static.lib(hdr_histogram.obj) : error LNK2019: unresolved external symbol __imp_floor, referenced in function hdr_calculate_bucket_config

Ping.cpp:
hdr_histogram *histogram; hdr_init(1, 10 * 1000 * 1000 * 1000LL, 3, &histogram);

hdr_histogram.c
`
int hdr_init(
int64_t lowest_trackable_value,
int64_t highest_trackable_value,
int significant_figures,
struct hdr_histogram** result)
{
int64_t* counts;
struct hdr_histogram_bucket_config cfg;
struct hdr_histogram* histogram;

int r = hdr_calculate_bucket_config(lowest_trackable_value, highest_trackable_value, significant_figures, &cfg);
...

}

int hdr_calculate_bucket_config(
int64_t lowest_trackable_value,
int64_t highest_trackable_value,
int significant_figures,
struct hdr_histogram_bucket_config* cfg)
{
...
largest_value_with_single_unit_resolution = 2 * power(10, significant_figures);
sub_bucket_count_magnitude = (int32_t) ceil(log((double)largest_value_with_single_unit_resolution) / log(2));
cfg->sub_bucket_half_count_magnitude = ((sub_bucket_count_magnitude > 1) ? sub_bucket_count_magnitude : 1) - 1;

cfg->unit_magnitude = (int32_t) floor(log((double)lowest_trackable_value) / log(2));
...

}
`

Release is OK, the problem occurs on Debug.

@mikeb01
Copy link
Contributor

mikeb01 commented Aug 28, 2020

This appears to be a problem with hdr histogram specifically (fortunately I maintain that too). What version of windows are you running?

@LaughingAngus
Copy link
Author

I'm running windows 10 professional, 1903.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants