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

Fix build in FreeBSD 12 #11

Merged
merged 1 commit into from
Sep 12, 2018
Merged

Conversation

fernape
Copy link
Contributor

@fernape fernape commented Aug 16, 2018

vm.stats.vm.* is not paired with the fields in struct vmmeter anymore.

So xosview fails to build on recent FreeBSD 12 because v_active_count, v_inactive_count and v_free_count are now missing

Since we are not using all the fileds in vmmeter anyway, define our own structure
with the fields we are interested in.

Testing:

  • Builds for {10.4,11.1}{amd64,i386}, 11.2amd64, 12i386 OK
  • Run test in 11.2 OK

vm.stats.vm.* is not paired with the fields in struct vmmeter anymore.

Since we are not using all the fileds in vmmeter, define our own structure
with the fields we are interested in.

Testing:

* Builds for {10.4,11.1}{amd64,i386}, 11.2amd64, 12i386 OK
* Run test in 11.2 OK
@kartikm
Copy link
Collaborator

kartikm commented Sep 11, 2018

@hills Can you look at this?

@hills hills merged commit 0b4861c into hills:master Sep 12, 2018
@fernape fernape deleted the fix_freebsd_12_build branch December 31, 2018 16:41
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Dec 31, 2018
No info for this new release.

While here:

* Remove BROKEN_* since this builds fine in 12 or greater.

* Simplify patch since some changes where merged upstream:
hills/xosview#11

PR:	234526
Reported by:	freebsd@oldach.net


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@488803 35697150-7ecd-e111-bb59-0022644237b5
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this pull request Dec 31, 2018
No info for this new release.

While here:

* Remove BROKEN_* since this builds fine in 12 or greater.

* Simplify patch since some changes where merged upstream:
hills/xosview#11

PR:	234526
Reported by:	freebsd@oldach.net


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@488803 35697150-7ecd-e111-bb59-0022644237b5
swills pushed a commit to swills/freebsd-ports that referenced this pull request Dec 31, 2018
No info for this new release.

While here:

* Remove BROKEN_* since this builds fine in 12 or greater.

* Simplify patch since some changes where merged upstream:
hills/xosview#11

PR:	234526
Reported by:	freebsd@oldach.net


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@488803 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Dec 31, 2018
No info for this new release.

While here:

* Remove BROKEN_* since this builds fine in 12 or greater.

* Simplify patch since some changes where merged upstream:
hills/xosview#11

PR:	234526
Reported by:	freebsd@oldach.net
mjsmith707 pushed a commit to mjsmith707/xosview that referenced this pull request Jan 18, 2020
Two examples of the bugs seen are below which cause the program to exit.
Handle them by moving to regular C file handling, which I preferred over
wrapping in exceptions as the error cases and releasing of resources is
clearer; elsewhere in the project we have considered them better for parsing
/sys and /proc information.

It looks like there is code here that parses /proc, and is most likely
redundant because users are unlikely to be on an old enough kernel to
require this; I imagine everyone has /sys mounted and we the codebase
probably won't build on the old compilers that would be required on such
systems.

  $ xosview
  Can not open file : /sys/class/net/tap0/statistics/rx_bytes

  $ xosview
  terminate called after throwing an instance of 'std::ios_base::failure'
    what():  basic_filebuf::underflow error reading the file
  Abort (core dumped)

  (gdb) bt
  #0  0x000000320a0325e5 in raise () from /lib64/libc.so.6
  hills#1  0x000000320a033dc5 in abort () from /lib64/libc.so.6
  hills#2  0x000000320f8bea7d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
  hills#3  0x000000320f8bcbd6 in ?? () from /usr/lib64/libstdc++.so.6
  hills#4  0x000000320f8bcc03 in std::terminate() () from /usr/lib64/libstdc++.so.6
  hills#5  0x000000320f8bcd22 in __cxa_throw () from /usr/lib64/libstdc++.so.6
  hills#6  0x000000320f8619da in std::__throw_ios_failure(char const*) () from /usr/lib64/libstdc++.so.6
  hills#7  0x000000320f87172a in std::basic_filebuf<char, std::char_traits<char> >::underflow() () from /usr/lib64/libstdc++.so.6
  hills#8  0x000000320f87809b in std::basic_istream<char, std::char_traits<char> >::sentry::sentry(std::basic_istream<char, std::char_traits<char> >&, bool) () from /usr/lib64/libstdc++.so.6
  hills#9  0x000000320f87860b in std::basic_istream<char, std::char_traits<char> >& std::basic_istream<char, std::char_traits<char> >::_M_extract<unsigned long long>(unsigned long long&) () from /usr/lib64/libstdc++.so.6
  hills#10 0x00000000004215a7 in NetMeter::getSysStats(unsigned long long&, unsigned long long&) ()
  hills#11 0x000000000042197a in NetMeter::checkevent() ()
  hills#12 0x000000000040c390 in XOSView::run() ()
  hills#13 0x000000000040b5a1 in main ()
svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this pull request Jan 10, 2024
No info for this new release.

While here:

* Remove BROKEN_* since this builds fine in 12 or greater.

* Simplify patch since some changes where merged upstream:
hills/xosview#11

PR:	234526
Reported by:	freebsd@oldach.net
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

3 participants