Skip to content

Commit

Permalink
PR review: fixed the first round issues, comments
Browse files Browse the repository at this point in the history
Signed-off-by: Hofi <hofione@gmail.com>
  • Loading branch information
HofiOne committed Sep 25, 2024
1 parent 07ed735 commit 44386d3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 33 deletions.
5 changes: 2 additions & 3 deletions doc/_dev-guide/chapter_0/section_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ this will give you detailed information of what {{ site.product.short_name }} do

First, check [[this|dev-platform-build-macos#dependencies]] if you have not got MacPorts installed and pre-configured yet.

Installation location of MacPorts will be referenced as `${MACPORTS_PREFIX}` in this document, as if you follow the installation instructions above it will be set already correctly independenty of your system.

The installation location of MacPorts will be referenced as `${MACPORTS_PREFIX}` in this document. If you follow the installation instructions above, it will already be set correctly, regardless of your system.
**Hint**: you can use `export MACPORTS_PREFIX=/opt/local` in your scripts or shell environments to get and reference the actual location of your MacPorts installation
{: .notice--info}

Expand Down Expand Up @@ -114,7 +113,7 @@ this will give you detailed information of what {{ site.product.short_name }} do

> **Note:**
>
> Bellow examples use `YOUR_INSTALLATION_ROOT` which is depending on the package manager you used to install {{ site.product.short_name }}.
> Below examples use `YOUR_INSTALLATION_ROOT` which is depending on the package manager you used to install {{ site.product.short_name }}.
{: .notice}

You can start it manually as a backround daemon
Expand Down
32 changes: 16 additions & 16 deletions doc/_dev-guide/chapter_4/section_2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Like every project {{ site.product.short_name }} also uses different libraries a

### Dependencies

The above mentioned dependencies can be satisfied by compiling every-each libs and tools manually, but it might be preferred to do it the easy way. Homebrew and MacPorts are package managers for macOS which has great community and support. You can also use them to install the dependencies you need.
The above mentioned dependencies can be satisfied by compiling every-each libs and tools manually, but it might be preferred to do it the easy way. Homebrew and MacPorts are package managers for macOS which have great communities and support. You can also use them to install the dependencies you need.

#### Using HomeBrew

Expand All @@ -33,7 +33,7 @@ The above mentioned dependencies can be satisfied by compiling every-each libs a
{: .notice}

2. Perform `brew update` if you have not done it yet.
3. The following packages should be installed for {{ site.product.short_name }}ng
3. The following packages should be installed for {{ site.product.short_name }}
* autoconf
* autoconf-archive
* automake
Expand All @@ -53,8 +53,8 @@ The above mentioned dependencies can be satisfied by compiling every-each libs a
* gracle
* grpc
* hiredis
* ~~libdbi~~ - See [bellow](#packages-note)!
* ~~libesmtp~~ - See [bellow](#packages-note)!
* ~~libdbi~~ - See [below](#packages-note)!
* ~~libesmtp~~ - See [below](#packages-note)!
* libmaxminddb
* libnet
* libpaho-mqtt
Expand All @@ -65,7 +65,7 @@ The above mentioned dependencies can be satisfied by compiling every-each libs a
* riemann-client
6. Extra development tools you might require
* criterion
* ~~gcc@14~~ - See [bellow](#packages-note)!
* ~~gcc@14~~ - See [below](#packages-note)!

**Hint:** If you have [[{{ site.product.short_name }} installed via brew|dev-inst-macos#installation]], as a reference, you can check the dependencies of the brew built version using `brew deps syslog-ng`
{: .notice--info}
Expand Down Expand Up @@ -100,7 +100,7 @@ brew install \
gradle \
grpc \
hiredis \
# Do not use the homebrew provided one, see !
# Do not use the homebrew provided one, see below!
# libdbi
# Homebrew does not have this lib yet
# libesmtp
Expand Down Expand Up @@ -149,7 +149,7 @@ brew install \
* gradle
* grpc
* hiredis
* ~~libdbi~~ - See [bellow](#packages-note)!
* ~~libdbi~~ - See [below](#packages-note)!
* libesmtp
* libmaxminddb
* libnet
Expand All @@ -158,10 +158,10 @@ brew install \
* paho.mqtt.c
* python3
* rabbitmq-c
* ~~riemann-client~~ - See [bellow](#packages-note)!
* ~~riemann-client~~ - See [below](#packages-note)!
7. Extra development tools you might require
* criterion
* ~~gcc@14~~ - See [bellow](#packages-note)!
* ~~gcc@14~~ - See [below](#packages-note)!

**Hint:** If you have [[{{ site.product.short_name }} installed via MacPorts|dev-inst-macos#installation-via-macports]], as a reference, you can check the dependencies of the MacPorts built version using `port deps syslog-ng`
{: .notice--info}
Expand All @@ -170,9 +170,9 @@ This is how it might look like if you start from the ground:

```shell
# DO NOT FORGET! Install the MacPorts package first which has a GUI installer. https://www.macports.org/install.php
# But, you can install it from the comamnd line as well, like
# But, you can install it from the command line as well, like

# WARNING! SET the bellow url and package name according to your needs and OS version !!!
# WARNING! SET the below url and package name according to your needs and OS version !!!
export MACPORTS_PKG_NAME=MacPorts-2.10.1-Sonoma.pkg
export MACPORTS_URL=https://github.com/macports/macports-base/releases/download/v2.10.1/${MACPORTS_PKG_NAME}

Expand Down Expand Up @@ -203,7 +203,7 @@ sudo port install \
gradle \
grpc \
hiredis \
# Do not use the homebrew provided one, see !
# Do not use the homebrew provided one, see below!
# libdbi
libesmtp \
libmaxminddb \
Expand Down Expand Up @@ -312,7 +312,7 @@ sudo port install \
export LDFLAGS="-L${MACPORTS_PREFIX}/lib ${LDFLAGS}"
```

**Note:** It could also happen that you must provide here further library inlcude and lib paths, e.g. for openssl 1.1.x, etc.
**Note:** Providing further library paths might be necessary. (e.g. for openssl 1.1.x, etc.)
{: .notice}

### Getting the source
Expand Down Expand Up @@ -365,7 +365,7 @@ export CXX=g++ # More precisly, the full path of your installed g++ compiler
mkdir build; cd build

# Finally, you can start the configuration with enabling or disabling the various modules e.g. like this
# NOTE: you might want to use the --prefix /full_path_of_your/installdir/ parameters as well, see bellow Warning!
# NOTE: you might want to use the --prefix /full_path_of_your/installdir/ parameters as well, see below Warning!
../configure --with-ivykis=system --with-systemd-journal=no --disable-java --disable-java-modules
```

Expand Down Expand Up @@ -460,11 +460,11 @@ For trying force enable a given module you can use e.g. `--enable-kafka` that wi
If you have all the above mentioned dependencies installed, for the full (currently supported) feature set you can simply use

```shell
# NOTE: you might want to use the --install-prefix /full_path_of_your/installdir/ parameters as well, see bellow Warning!
# NOTE: you might want to use the --install-prefix /full_path_of_your/installdir/ parameters as well, see below Warning!
cmake --install-prefix /full_path_of_your/installdir -B build . -Wno-dev -DIVYKIS_SOURCE=system --fresh
```

**Warning:** By a good chance, you might want to install the self built instance first to a custom location to prevent overwriting a possibly already existing installed version. In that case pass `---install-prefix /full_path_of_your/installdir/` parameter to the `cmake` command like you see in the above steps.
**Warning:** You may want to install the self-built instance to a custom location first to avoid overwriting an existing installed version. In that case, pass the `--install-prefix /full_path_of_your/installdir/` parameter to the `cmake` command, as shown in the steps above.
{: .notice--danger}

At the end of the configure step you should see the module list will be used during the compilation and installation steps, it should look similar to this
Expand Down
25 changes: 11 additions & 14 deletions doc/_dev-guide/chapter_4/section_3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ The above mentioned dependencies can be satisfied by compiling every-each libs a
* gperf
* glib
* gmake
* ivykis - See [bellow](#packages-note)!
* ivykis - See [below](#packages-note)!
* json-c
* libtool
* pcre2
* pkg-config
1. The extra modules would require the following
* gradle
* grpc - See [bellow](#packages-note)!
* grpc - See [below](#packages-note)!
* hiredis
* libdbi
* libdbi-drivers
Expand All @@ -57,10 +57,7 @@ The above mentioned dependencies can be satisfied by compiling every-each libs a
* riemann-c-client
1. Extra development tools you might require
* criterion
* gcc14 - See [bellow](#packages-note)!

**Hint:** If you have [[{{ site.product.short_name }} installed already via FreeBSD Ports, as a reference, you can check the dependencies of the installed version using `brew deps syslog-ng`
{: .notice--info}
* gcc14 - See [below](#packages-note)!

This is how it might look like if you start from the ground:

Expand Down Expand Up @@ -101,7 +98,7 @@ sudo pkg install \
riemann-c-client \
# Optional, needed for unit testing
criterion \
# Optional, clang now should compile all modules nicely and it is the oficially supported compiler on FreeBSD
# Optional, clang now should compile all modules nicely and it is the officially supported compiler on FreeBSD
gcc14
```

Expand Down Expand Up @@ -140,7 +137,7 @@ export CXXFLAGS="${CFLAGS} ${CXXFLAGS}"
export LDFLAGS="-L${BSDPORTS_PREFIX}/lib ${LDFLAGS}"
```

**Note:** It could also happen that you must provide here further library inlcude and lib paths
**Note:** Providing further library paths might be necessary.
{: .notice}

### Getting the source
Expand All @@ -155,7 +152,7 @@ git clone https://github.com/syslog-ng/syslog-ng .
### Select the compiler

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.
`gcc` still might compile {{ site.product.short_name }} and most of its modules, but there is no guarantee and support of it anymore.

**Hint:** You can always turn off any problematic module via its feature switch.
{: .notice--info}
Expand Down Expand Up @@ -186,21 +183,21 @@ export CXX=g++ # More precisly, the full path of ypur installed g++ compiler
#### Using autotool

```shell
# you should use `gmake` instead of `make` on FreeBSD to configure and build syslog-ng with autotools.
# You should use `gmake` instead of `make` on FreeBSD to configure and build syslog-ng with autotools.
export MAKE=gmake

./autogen.sh

# it is always a good idea keeping as clean the source folder as pissible, so
# It is always a good idea to keep the source folder as clean as possible, so
# use a dedicated build folder for easier cleanup
mkdir build; cd build

# Finally, you can start the configuration with enabling or disabling the various modules e.g. like this
# NOTE: you might want to use the --prefix /full_path_of_your/installdir/ parameters as well, see bellow Warning!
# NOTE: you might want to use the --prefix /full_path_of_your/installdir/ parameters as well, see below Warning!
../configure --enable-extra-warnings --with-ivykis=system --with-systemd-journal=no --disable-java --disable-java-modules
```

**Warning:** By a good chance, you might want to install the self built instance first to a custom location to prevent overwriting a possibly already existing installed version. In that case pass `--prefix /full_path_of_your/installdir/` to the `configure` script in the above steps.
**Warning:** You may want to install the self-built instance to a custom location first to avoid overwriting an existing installed version. In that case, pass the `--prefix /full_path_of_your/installdir/` parameter to the `configue` command, as shown in the steps above.
{: .notice--danger}

If you have all the above mentioned dependencies installed, for the full feature set you can simply use for example (excluded the not yet supported modules on FreeBSD)
Expand Down Expand Up @@ -388,7 +385,7 @@ gmake install
cmake --build build/. --target install -j4
```

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

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

0 comments on commit 44386d3

Please sign in to comment.