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

Update prepare.sh to resolve gcc error during CRAS compile #4957

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mkststrahilov
Copy link

@mkststrahilov mkststrahilov commented Apr 2, 2023

Fix for #4923

CRAS fails to compile due to gcc error, a temporary fix was proposed via targets/audio to omit the wrong commands but could not get it to work really... instead implemented the fix directly to convert_automake and it complied without issue.

First time doing a pull request, so if doing something wrong - please have mercy

Copy link
Collaborator

@drinkcat drinkcat left a comment

Choose a reason for hiding this comment

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

Instead of this, can you edit Makefile.am directly?

The idea is to remove this line (https://chromium.googlesource.com/chromiumos/third_party/adhd/+/c2ece09f69565afcbcf511b1693f3fe735bde511/cras/src/Makefile.am#50):

COMMON_CPPFLAGS += -Werror=undef-prefix -Wundef-prefix=HAVE_,CRAS_

So something like this will do, around here (https://github.com/dnschneid/crouton/blob/master/targets/audio#L165):

	sed -i -e 's/^.*error=undef-prefix.*$//'  Makefile.am

(it's a bit less strict that necessary but that's ok for now, and we have bigger problems incoming..., see #4958)

@drinkcat
Copy link
Collaborator

drinkcat commented Apr 2, 2023

Or as @dnschneid mentioned:

	sed -i -e '/error=undef-prefix/d'  Makefile.am

@mkststrahilov
Copy link
Author

mkststrahilov commented Apr 2, 2023

Instead of this, can you edit Makefile.am directly?

The idea is to remove this line (https://chromium.googlesource.com/chromiumos/third_party/adhd/+/c2ece09f69565afcbcf511b1693f3fe735bde511/cras/src/Makefile.am#50):

COMMON_CPPFLAGS += -Werror=undef-prefix -Wundef-prefix=HAVE_,CRAS_

So something like this will do, around here (https://github.com/dnschneid/crouton/blob/master/targets/audio#L165):

	sed -i -e 's/^.*error=undef-prefix.*$//'  Makefile.am

(it's a bit less strict that necessary but that's ok for now, and we have bigger problems incoming..., see #4958)

I can try to play around with it tomorrow and see if it works fine. Just learned about sed yesterday, been reading documentation left-right to figure what to do, cause I wanted to try Crouton out of curiosity. But hey, learning something new ain't bad hehe.

Just checked #4958... oh boy.

Note to myself - what is Bazel... why is bazel

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

Successfully merging this pull request may close these issues.

None yet

2 participants