configure: fix duplicate of -lrt flag #2

Closed
totoroliu wants to merge 1 commits from master into master
totoroliu commented 2014-05-23 00:17:35 +02:00 (Migrated from github.com)

'-lrt' flag duplication would cause 'undefined reference to clock_gettime' error
during compilation time.

Before fix:
... -o qemu-bridge-helper qemu-bridge-helper.o -lrt -pthread -lgthread-2.0 -lrt -lglib-2.0
After fix:
... -o qemu-bridge-helper qemu-bridge-helper.o -pthread -lgthread-2.0 -lrt -lglib-2.0

Reference:
http://hi.baidu.com/sanitywolf/item/7a8b69c1e76dd220a0b50ab1

'-lrt' flag duplication would cause 'undefined reference to clock_gettime' error during compilation time. Before fix: ... -o qemu-bridge-helper qemu-bridge-helper.o -lrt -pthread -lgthread-2.0 -lrt -lglib-2.0 After fix: ... -o qemu-bridge-helper qemu-bridge-helper.o -pthread -lgthread-2.0 -lrt -lglib-2.0 Reference: http://hi.baidu.com/sanitywolf/item/7a8b69c1e76dd220a0b50ab1
afaerber commented 2014-05-23 12:51:10 +02:00 (Migrated from github.com)

Hi Rick,

Where are you seeing such a build error? I'm not seeing it in our devel project:
https://build.opensuse.org/package/show/Virtualization/qemu
https://build.opensuse.org/package/show/Virtualization/qemu-linux-user
Are you maybe using GCC 4.9?

Further your patch does not seem to be in upstream qemu.git. If you haven't already, please submit it to qemu-devel according to http://wiki.qemu-project.org/Contribute/SubmitAPatch (note: Signed-off-by is missing on your commit), then we can easily cherry-pick that patch onto our branch if needed.

Thanks,
Andreas

Hi Rick, Where are you seeing such a build error? I'm not seeing it in our devel project: https://build.opensuse.org/package/show/Virtualization/qemu https://build.opensuse.org/package/show/Virtualization/qemu-linux-user Are you maybe using GCC 4.9? Further your patch does not seem to be in upstream qemu.git. If you haven't already, please submit it to qemu-devel according to http://wiki.qemu-project.org/Contribute/SubmitAPatch (note: Signed-off-by is missing on your commit), then we can easily cherry-pick that patch onto our branch if needed. Thanks, Andreas
totoroliu commented 2014-05-23 18:52:47 +02:00 (Migrated from github.com)

Hi Andreas,

I'm actually using an old gcc 4.6.1.

I just found out you did the fix via SPEC file instead of via upstream qemu.git.
qemu-linux-user.spec:
LINE 186:

-lrt needs to come after -lglib-2.0 to avoid undefined clock_gettime

sed -i "s/-lglib-2.0/-lglib-2.0 -lrt/" config-host.mak

I'll remove the pull request.

Thanks,

Rick

-----Original Message-----
From: Andreas Färber [mailto:notifications@github.com]
Sent: Friday, May 23, 2014 3:51 AM
To: openSUSE/qemu
Cc: Rick Liu
Subject: Re: [qemu] configure: fix duplicate of -lrt flag (#2)

Hi Rick,

Where are you seeing such a build error? I'm not seeing it in our devel project:
https://build.opensuse.org/package/show/Virtualization/qemu
https://build.opensuse.org/package/show/Virtualization/qemu-linux-user
Are you maybe using GCC 4.9?

Further your patch does not seem to be in upstream qemu.git. If you haven't already, please submit it to
qemu-devel according to http://wiki.qemu-project.org/Contribute/SubmitAPatch (note: Signed-off-by is
missing on your commit), then we can easily cherry-pick that patch onto our branch if needed.

Thanks,
Andreas


Reply to this email directly or view it on GitHub
https://github.com/openSUSE/qemu/pull/2#issuecomment-43994640 .
<https://github.com/notifications/beacon/1186506__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJl
cyI6MTcxNjQ2MTQ3MCwiZGF0YSI6eyJpZCI6MzI5MDg2ODJ9fQ==--
96fd538a4f3de2e465a9a68759c1e9304cd0aaf0.gif>

Hi Andreas, I'm actually using an old gcc 4.6.1. I just found out you did the fix via SPEC file instead of via upstream qemu.git. qemu-linux-user.spec: LINE 186: # -lrt needs to come after -lglib-2.0 to avoid undefined clock_gettime sed -i "s/-lglib-2.0/-lglib-2.0 -lrt/" config-host.mak I'll remove the pull request. Thanks, Rick > -----Original Message----- > From: Andreas Färber [mailto:notifications@github.com] > Sent: Friday, May 23, 2014 3:51 AM > To: openSUSE/qemu > Cc: Rick Liu > Subject: Re: [qemu] configure: fix duplicate of -lrt flag (#2) > > Hi Rick, > > Where are you seeing such a build error? I'm not seeing it in our devel project: > https://build.opensuse.org/package/show/Virtualization/qemu > https://build.opensuse.org/package/show/Virtualization/qemu-linux-user > Are you maybe using GCC 4.9? > > Further your patch does not seem to be in upstream qemu.git. If you haven't already, please submit it to > qemu-devel according to http://wiki.qemu-project.org/Contribute/SubmitAPatch (note: Signed-off-by is > missing on your commit), then we can easily cherry-pick that patch onto our branch if needed. > > Thanks, > Andreas > > — > Reply to this email directly or view it on GitHub > https://github.com/openSUSE/qemu/pull/2#issuecomment-43994640 . > <https://github.com/notifications/beacon/1186506__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJl > cyI6MTcxNjQ2MTQ3MCwiZGF0YSI6eyJpZCI6MzI5MDg2ODJ9fQ==-- > 96fd538a4f3de2e465a9a68759c1e9304cd0aaf0.gif>

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dfaggioli/qemu#2
No description provided.