Skip to content

Commit

Permalink
FreeBSD: add FreeBSD build info
Browse files Browse the repository at this point in the history
Signed-off-by: Hofi <[email protected]>
  • Loading branch information
HofiOne committed Sep 25, 2024
1 parent 7ed46a4 commit 07ed735
Show file tree
Hide file tree
Showing 4 changed files with 492 additions and 10 deletions.
5 changes: 5 additions & 0 deletions _data/external_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ flask:
url: http://flask.pocoo.org/
title: [ "Flask" ]

freebsd-ports:
id: freebsd-ports
url: https://ports.freebsd.org/cgi/ports.cgi
title: [ "/FreeBSD [Pp]orts/" ]

freepascal-launchd:
id: freepascal-launchd
url: https://wiki.freepascal.org/macOS_daemons_and_agents
Expand Down
12 changes: 8 additions & 4 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ admin-guide-nav:
- title: "Configuring {{ site.product.short_name }} relays"
url: /admin-guide/040_Quick-start_guide/002_Configuring_syslog-ng_relays/README
subnav:
- title: "Configuring {{ site.product.short_name }} on relay hosts"
url: /admin-guide/040_Quick-start_guide/002_Configuring_syslog-ng_relays/000_Configuring_syslog-ng_on_relay_hosts
- title: "How relaying log messages works"
url: /admin-guide/040_Quick-start_guide/002_Configuring_syslog-ng_relays/001_How_relaying_works
- title: "Managing and checking {{ site.product.short_name }} service on Linux"
Expand Down Expand Up @@ -841,13 +839,13 @@ admin-guide-nav:
url: /admin-guide/120_Parser/014_panos_parser/001_Panos_parser_options
- title: "Sudo parser"
url: /admin-guide/120_Parser/015_sudo_parser
- title: "MariaDB parser"
url: /admin-guide/120_Parser/016_mariadb_parser
- title: "PostgreSQL parser"
url: /admin-guide/120_Parser/016_PostgreSQL_csvlog_parser/README
subnav:
- title: "PostgreSQL csvlog parser options"
url: /admin-guide/120_Parser/016_PostgreSQL_csvlog_parser/001_PostgreSQL_parser_options
- title: "MariaDB parser"
url: /admin-guide/120_Parser/016_mariadb_parser
- title: "metrics-probe()"
url: /admin-guide/120_Parser/017_metrics_probe_parser/README
subnav:
Expand Down Expand Up @@ -1193,6 +1191,9 @@ dev-guide-nav:
url: /dev-guide/chapter_4/section_2/macos-testing-status/afuser
- title: "elasticsearch-http"
url: /dev-guide/chapter_4/section_2/macos-testing-status/elasticsearch-http
- title: "grpc"
url: /dev-guide/chapter_4/section_2/macos-testing-status/grpc/README
subnav:
- title: "http"
url: /dev-guide/chapter_4/section_2/macos-testing-status/http
- title: "mod-python"
Expand All @@ -1217,6 +1218,9 @@ dev-guide-nav:
url: /dev-guide/chapter_4/section_2/macos-testing-status/system-source/01_collecting-native-logs
- title: "Collecting local macOS logs"
url: /dev-guide/chapter_4/section_2/macos-testing-status/system-source/02_collecting-local-logs
- title: "FreeBSD"
url: /dev-guide/chapter_4/section_3/README
subnav:
- title: "Contribution"
url: /dev-guide/chapter_5/README
subnav:
Expand Down
40 changes: 34 additions & 6 deletions doc/_dev-guide/chapter_4/section_2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,11 @@ sudo port install \
export PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/openssl/lib/pkgconfig:${HOMEBREW_PREFIX}/opt/net-snmp/lib/pkgconfig:${HOMEBREW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}
```

Some of the modules will not, or will incorrectly provide pkg-config support (even if added to `PKG\_CONFIG\_PATH`, e.g. libmaxminddb), to help the automatic configurations find them you can add brew to `CFLAGS`, `CPPFLAGS`, and `LDFLAGS`
Some of the modules will not, or will incorrectly provide pkg-config support (even if added to `PKG\_CONFIG\_PATH`, e.g. libmaxminddb), to help the automatic configurations find them you can add brew to `CFLAGS`, `CXXFLAGS`, and `LDFLAGS`

```shell
export CFLAGS="-I${HOMEBREW_PREFIX}/include/ ${CFLAGS}"
export CPPFLAGS="${CFLAGS} ${CPPFLAGS}"
export CXXFLAGS="${CFLAGS} ${CXXFLAGS}"
export LDFLAGS="-L${HOMEBREW_PREFIX}/lib ${LDFLAGS}"
```

Expand Down Expand Up @@ -304,11 +304,11 @@ sudo port install \
export PKG_CONFIG_PATH=${MACPORTS_PREFIX}/opt/openssl/lib/pkgconfig:${MACPORTS_PREFIX}/opt/net-snmp/lib/pkgconfig:${MACPORTS_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}
```

Some of the modules will not, or will incorrectly provide pkg-config support (even if added to `PKG\_CONFIG\_PATH`, e.g. libmaxminddb), to help the automatic configurations find them you can add brew to `CFLAGS`, `CPPFLAGS`, and `LDFLAGS`
Some of the modules will not, or will incorrectly provide pkg-config support (even if added to `PKG\_CONFIG\_PATH`, e.g. libmaxminddb), to help the automatic configurations find them you can add brew to `CFLAGS`, `CXXFLAGS`, and `LDFLAGS`

```shell
export CFLAGS="-I${MACPORTS_PREFIX}/include/ ${CFLAGS}"
export CPPFLAGS="${CFLAGS} ${CPPFLAGS}"
export CXXFLAGS="${CFLAGS} ${CXXFLAGS}"
export LDFLAGS="-L${MACPORTS_PREFIX}/lib ${LDFLAGS}"
```

Expand All @@ -329,7 +329,7 @@ git clone https://github.com/syslog-ng/syslog-ng .
Latest version of {{ site.product.short_name }} [has dropped support of gcc](https://github.com/syslog-ng/syslog-ng/pull/4897), so now the platform default llvm/clang must be used to complie the source.\
`gcc` still might compile {{ site.product.short_name }} and most of its modules, but there is no guarantie and support of it anymore

**Hint:** You can turn off any problematic module via its feature switch
**Hint:** You can always turn off any problematic module via its feature switch
{: .notice--info}

To make sure clang is used you can use (optional):
Expand Down Expand Up @@ -395,7 +395,7 @@ syslog-ng Open Source Edition 4.8.0.155.g8590bdc.dirty configured
C++ compiler : clang++ -std=gnu++11 -std=gnu++17 - Apple clang version 15.0.0 (clang-1500.3.9.4) - /usr/bin/clang++
C++ compiler options : -fno-omit-frame-pointer -O2 -g
linker flags : -L/opt/homebrew/opt/ruby/lib -L/opt/homebrew/opt/openssl@3/lib -L/opt/homebrew/lib -L/opt/local/lib
prefix : /Users/hofi/Develop/Balabit/syslog-ng/build/install
prefix : /full_path_of_your/installdir
linking mode : dynamic
classic linking mode : no
embedded crypto : no
Expand Down Expand Up @@ -563,6 +563,34 @@ make install
cmake --build build/. --target install -j4
```

After a succesful build you can check the built and supported modules via

```shell
`/full_path_of_your/installdir`/syslog-ng -V
```

The `Available-Modules:` entry of the output of the above command will show the available modules

```shell
syslog-ng 4.8.0.240.gcf39eb3.dirty
Config version: 4.2
Installer-Version: 4.8.0.240.gcf39eb3.dirty
Revision: 4.8.0.240.gcf39eb3.dirty
Compile-Date: Sep 24 2024 17:57:15
Module-Directory: /full_path_of_your/installdir/lib/syslog-ng
Module-Path: /full_path_of_your/installdir/lib/syslog-ng
Include-Path: /full_path_of_your/installdir/share/syslog-ng/include
Available-Modules: bigquery,timestamp,darwinosl,kvformat,redis,riemann,afamqp,appmodel,afprog,loki,examples,metrics-probe,cef,map_value_pairs,otel,afsnmp,kafka,stardate,system-source,confgen,afuser,xml,disk-buffer,tfgetent,linux-kmsg-format,cloud_auth,correlation,json-plugin,pseudofile,affile,afsmtp,csvparser,basicfuncs,syslogformat,hook-commands,mqtt,afmongodb,graphite,tags-parser,geoip2-plugin,afstomp,http,secure-logging,afsql,mod-python,afsocket,add_contextual_data,mod-java,cryptofuncs,azure-auth-header,regexp-parser,rate_limit_filter
Enable-Debug: on
Enable-GProf: off
Enable-Memtrace: off
Enable-IPv6: on
Enable-Spoof-Source: on
Enable-TCP-Wrapper: off
Enable-Linux-Caps: off
Enable-Systemd: off
```

### Testing

In order to run the tests, you have to install first the Criterion testing framework (for example: `brew install criterion`), and re-[configure](#configuration) the build with testing enabled (`--enable-tests` or `-DBUILD_TESTING=ON`). After that use the command below:
Expand Down
Loading

0 comments on commit 07ed735

Please sign in to comment.