profile
viewpoint
Tamás Szelei sztomi Budapest http://szelei.me I'm only here for the food.

rpclib/rpclib 853

rpclib is a modern C++ msgpack-RPC server and client library

sztomi/code-generator 125

Contains the full source for my article about implementing a code generator with libclang.

sztomi/cmonster 33

Python wrapper for the Clang C++ preprocessor and parser.

16tons/camp 4

C++ multi-purpose reflection library

bincrafters/conan-frozen 1

[OBSOLETE] The recipe is now in https://github.com/conan-io/conan-center-index

borsi/instantoravecznora 1

instant oravecz nóra idézetgenerátor back,- és frontend

sztomi/cNBT 1

An NBT file parser and manipulator library

bincrafters/conan-lief 0

Conan package for LIEF, Library to Instrument Executable Formats

bincrafters/conan-mbedtls 0

[OBSOLETE] The recipe is now in https://github.com/conan-io/conan-center-index

pull request commentopenssl/openssl

Fix R_AARCH64_PREL64 relocation error when statically linking on aarch64

@iamamoose apologies - it seems like I originally sent the wrong form (which I was told via email), but then I forgot to follow up. I'll send it ASAP.

sztomi

comment created time in 3 days

issue commentsfackler/rust-openssl

Can't build for musl on Linux

@parasyte thank you so much for mentioning that here, works like a charm.

Timmmm

comment created time in 13 days

issue commentNixOS/patchelf

--replace-needed calls corrupt these executables

@domenkozar in that case I suggest bisecting from the 0.9 tag (because that one didn't have this issue).

sztomi

comment created time in 21 days

issue commentNixOS/patchelf

--replace-needed calls corrupt these executables

@domenkozar the binaries I shared are still downloadable through the links in my first post. Happy to check for you, but it's probably more effective if you try those yourself (especially if the bug is still present).

sztomi

comment created time in 24 days

issue closedconan-io/conan

[feature] Allow customizing install prefix in the Meson helper

Currently, the Meson build helper hardcodes the install prefix to self.package_folder. This is not always desirable, e.g. in our case we want to do some post-processing on the files after the build, but before package(). My attempts at resolving this:

1. Attempting to customize the install prefix as I would on the meson command line:
    meson.configure(args=["--prefix", "install"])

Will cause

ERROR: Got argument prefix as both -Dprefix and --prefix. Pick one.

If I set it in the defs param, it simply gets overwritten in conan code here:

        # overwrite default values with user's inputs
        self.options.update(defs)

(note that the comment says user's inputs, but this value is not set by the user).

2. Attempting to set DESTDIR for ninja:
    os.environ["DESTDIR"] = "./install"
    meson.install()

This will prepend whatever is set in the environment dir to the package path, so in this case it becomes ./install/home/....long path..... Not sure why this is, probably ninja behavior.

3. Overwriting options in the meson helper
    meson = Meson(self)
    inst_dir = Path("install").resolve()
    inst_dir.mkdir(parents=True)
    meson.options["prefix"] = str(inst_dir)

This works, but it's not great: it's undocumented and manipulates internal data of the helper. I think it would be best if there was an install_folder parameter to the configure method that allows setting this.

Do note that all other values set in options in the constructor are similarly hardcoded from the user's point of view because of the same line I linked above.

closed time in a month

sztomi

issue commentconan-io/conan

[feature] Allow customizing install prefix in the Meson helper

@TheQwertiest yeah, that worked fine. I think I set -Dprefix as the key originally and then looked for an explanation in the source, but totally overlooked that the update was happening in the other direction. Sorry for the noise.

sztomi

comment created time in a month

issue commentconan-io/conan

[feature] Allow customizing install prefix in the Meson helper

oh! you must be right. I could swear I tried that and it didn't work, but I'll check again. Thanks for pointing that out

sztomi

comment created time in a month

issue commentconan-io/conan

[feature] Allow customizing install prefix in the Meson helper

@TheQwertiest nope, as I mentioned I tried that, too. The reason is the line I linked. Well, more precisely, prefix is hardcoded here:

        if self._conanfile.package_folder:
            self.options['prefix'] = self._conanfile.package_folder

So no matter what you set there, it will be overwritten.

sztomi

comment created time in a month

issue openedconan-io/conan

[feature] Allow customizing install prefix in the Meson helper

Currently, the Meson build helper hardcodes the install prefix to self.package_folder. This is not always desirable, e.g. in our case we want to do some post-processing on the files after the build, but before package(). My attempts at resolving this:

1. Attempting to customize the install prefix as I would on the meson command line:
    meson.configure(args=["--prefix", "install"])

Will cause

ERROR: Got argument prefix as both -Dprefix and --prefix. Pick one.

If I set it in the defs param, it simply gets overwritten in conan code here:

        # overwrite default values with user's inputs
        self.options.update(defs)

(note that the comment says user's inputs, but this value is not set by the user).

2. Attempting to set DESTDIR for ninja:
    os.environ["DESTDIR"] = "./install"
    meson.install()

This will prepend whatever is set in the environment dir to the package path, so in this case it becomes ./install/home/....long path..... Not sure why this is, probably ninja behavior.

3. Overwriting options in the meson helper
    meson = Meson(self)
    inst_dir = Path("install").resolve()
    inst_dir.mkdir(parents=True)
    meson.options["prefix"] = str(inst_dir)

This works, but it's not great: it's undocumented and manipulates internal data of the helper. I think it would be best if there was an install_folder parameter to the configure method that allows setting this.

Do note that all other values set in options in the constructor are similarly hardcoded from the user's point of view because of the same line I linked above.

created time in a month

issue commentSynoCommunity/spkrepo

Is there a way to refer to packages hosted somewhere else?

I think storage is used for hosting (obviously) but also the package signing process, so an URL won't work.

Why not? We are signing our spk packages already (and upload them as such). We don't really need spkrepo to do that for us.

Should the package already exist in the bucket or is it spkrepo's responsibility to upload it?

In our case, we deploy the files already to S3, and while in some cases it might be nice if spkrepo did upload it, I would consider that an extra feature. For our usecase, this is not needed (in fact, it would be difficult to manage credentials etc.)

Should spkrepo perform a regular scan of the bucket to import packages or should it be only done by API call?

For our needs, we control both the repo and the bucket, so we can be sure that we always call the API when we uploaded the package.

Package signing workflow requires to edit the package thus write access to the bucket. How to handle that?

I think this theoretical new endpoint should be a bare-bones feature intended for integration with existing infrastructure. That really only registers the package and the metadata, with storage pointing to a given link (be it S3 or anything else).

sztomi

comment created time in a month

issue openedned14/pcpp

Document hooks behavior

I was trying to locate some directives with their full extents in a header file. I figured using on_directive_handle would help me, but nothing I did seemed to call the hook functions. It turns out I had to call write after parsing in order for the hooks to be called.

Can you clarify what exactly parse does and if it's really needed to write the preprocessed output in order to get the hooks called? Is there a way to avoid that?

created time in a month

issue commentjacobaustin123/Coral

Continuous integration

Hey, thanks for reaching out, happy to see this project is still alive and kicking!

sztomi

comment created time in a month

issue openedSynoCommunity/spkrepo

Is there a way to refer to packages hosted somewhere else?

Hi! We are looking into creating an official package source for Plex Media Server. I was wondering if spkrepo is something we could use. From what I understood from the documentation, the API accepts and spk file which the server then stores in the data directory. We are normally hosting our downloads in an S3 bucket and I was wondering if there was a way to simply give spkrepo a URL instead of the file?

created time in a month

create barnchsztomi/hcb

branch : master

created branch time in a month

created repositorysztomi/hcb

header code bad.

created time in a month

issue commentwavebox/waveboxapp

Wavebox 10 source

After a few months of testrunning, I completely moved to Ferdi. Canceled my subscription with a heavy heart. I did some soul searching and honestly, I didn't even want to look at the source code myself. So why am I annoyed by this? I came to the conclusion that it's because:

  • When I signed up it was FOSS and supporting such business model was one of the reasons I signed up
  • The argument why it becomes closed source feels dishonest and counterarguments were not addressed (see above: conflating access to source code with access to build infrastructure)
Thomas101

comment created time in a month

issue commentconan-io/conan

[question] Is libstdc++11 used in Linux clang?

The answer to the first question is yes, we are currently using it exactly as described. The second question I'm a bit confused about, can you clarify what you meant by libstdc++ ABI?

danimtb

comment created time in 2 months

issue commentfmtlib/fmt

Question about generated code size - am I holding this wrong?

So why am I getting such different numbers in the compiler explorer I linked?

sztomi

comment created time in 2 months

issue openedfmtlib/fmt

Question about generated code size - am I holding this wrong?

I wanted to find a good alternative to boost::lexical_cast<string>(int) that generates less code. After some experiments on Compiler Explorer, I was surprised to see that fmt generated more code than boost::lexical_cast. I ended up using std::to_string, but ran a couple more experiments and was surprised to find that there is a 4x size increase between fmt 4.2 and 6.2 (for the same code, same flags, same compiler). Why does this happen, and am I supposed to do something differently to decrease the code size?

This is the code, compiled with clang 9.0, with -O2. https://godbolt.org/z/SXLDU4

#include <boost/lexical_cast.hpp>

#include <string>

void lexical_cast() {
    auto x = boost::lexical_cast<std::string>(1234);
}

// -------

#include <fmt/format.h>

void fmt_convert() {
    auto x = fmt::format("{}", 1234);
}

// -------

#include <string>

void to_string_convert() {
    auto x = std::to_string(1234);
}

Summary:

Code size Multiplier
std::to_string 435847
lexical_cast 1165849
fmt 4.2 3544508
fmt 6.2 14151966
fmt 6.2 C++17 13964677
fmt 6.2 FMT_STRING, C++17 13966847

created time in 2 months

issue commentconan-io/conan

[question] profile compatibility: same settings, different compiler/flags

@TheQwertiest yeah, I can only echo what @danimtb said. Anything that affects ABI compatibility, you will need to model in the settings. You can model more (such as C++ standard level, which is not strictly ABI-breaking), but not less. I would not add a blanket "toolchain" setting though. Rather, something that explicitly describes the difference. From your example it looks like you have some incompatible flags. Then call those out in the settings. Also, you can leave out the setting from a recipe if it does not affect it.

TheQwertiest

comment created time in 2 months

pull request commentconan-io/conan

initial draft of conan search_binary command

From my point of view, this would be useful even if it wasn't 100% compatible with the install invocation (that certainly helps though). Very grateful that you are tackling this @solvingj !

solvingj

comment created time in 2 months

startedmstorsjo/llvm-mingw

started time in 2 months

issue commentWillPower3309/awesome-dotfiles

Specify awesome version beyond "git"

Thanks! I think any -git package, by definition is a moving target. So it's better to pinpoint a SHA or tag if possible.

sztomi

comment created time in 2 months

issue commentWillPower3309/awesome-dotfiles

Specify awesome version beyond "git"

FWIW, the error I get with master is different:

2020-05-03 18:36:20 W: awesome: luaA_dofunction:78: error while running function!
stack traceback:
	/usr/local/share/awesome/lib/awful/screen.lua:344: in function 'awful.screen.preferred'
	/home/tamas/.config/awesome/components/notifications.lua:167: in local 'func'
	/usr/local/share/awesome/lib/gears/object.lua:190: in function 'naughty.core.emit_signal'
	/usr/local/share/awesome/lib/naughty/notification.lua:1204: in function </usr/local/share/awesome/lib/naughty/notification.lua:1109>
	(...tail calls...)
	/home/tamas/.config/awesome/components/notifications.lua:107: in local 'func'
	/usr/local/share/awesome/lib/gears/object.lua:190: in function 'naughty.core.emit_signal'
	/usr/local/share/awesome/lib/naughty/init.lua:83: in function </usr/local/share/awesome/lib/naughty/init.lua:75>
	[C]: in metamethod '__index'
	/usr/local/share/awesome/lib/awful/screen.lua:344: in function 'awful.screen.preferred'
	/home/tamas/.config/awesome/components/notifications.lua:167: in local 'func'
	/usr/local/share/awesome/lib/gears/object.lua:190: in function 'naughty.core.emit_signal'
	/usr/local/share/awesome/lib/naughty/notification.lua:1204: in function </usr/local/share/awesome/lib/naughty/notification.lua:1109>
	(...tail calls...)
	/home/tamas/.config/awesome/components/wallpaper.lua:46: in main chunk
	[C]: in function 'require'
	/home/tamas/.config/awesome/rc.lua:36: in main chunk
error: /usr/local/share/awesome/lib/awful/screen.lua:344: attempt to index a nil value (local 'c')
error while running function!
stack traceback:
	/usr/local/share/awesome/lib/awful/screen.lua:344: in function 'awful.screen.preferred'
	/home/tamas/.config/awesome/components/notifications.lua:167: in local 'func'
	/usr/local/share/awesome/lib/gears/object.lua:190: in function 'naughty.core.emit_signal'
	/usr/local/share/awesome/lib/naughty/notification.lua:1204: in function </usr/local/share/awesome/lib/naughty/notification.lua:1109>
	(...tail calls...)
	/home/tamas/.config/awesome/components/wallpaper.lua:46: in main chunk
	[C]: in function 'require'
	/home/tamas/.config/awesome/rc.lua:36: in main chunk
error: /usr/local/share/awesome/lib/awful/screen.lua:344: attempt to index a nil value (local 'c')
sztomi

comment created time in 2 months

issue openedWillPower3309/awesome-dotfiles

Specify awesome version beyond "git"

I tried using the master of awesome (29f6387defd) but that doesn't work with this config. I also tried 6101ef51 (which is currently in the AUR PKGBUILD of awesome-git) but that also doesn't work. I'm getting the following error:

error while running function!
stack traceback:
	[C]: in function 'require'
	/home/tamas/.config/awesome/components/notifications.lua:16: in main chunk
	[C]: in function 'require'
	/home/tamas/.config/awesome/rc.lua:31: in main chunk
error: /home/tamas/.config/awesome/components/notifications.lua:16: module 'ruled' not found:
	no field package.preload['ruled']
	no file '/usr/local/share/lua/5.3/ruled.lua'
	no file '/usr/local/share/lua/5.3/ruled/init.lua'
	no file '/usr/local/lib/lua/5.3/ruled.lua'
	no file '/usr/local/lib/lua/5.3/ruled/init.lua'
	no file '/usr/share/lua/5.3/ruled.lua'
	no file '/usr/share/lua/5.3/ruled/init.lua'
	no file './ruled.lua'
	no file './ruled/init.lua'
	no file '/home/tamas/.config/awesome/ruled.lua'
	no file '/home/tamas/.config/awesome/ruled/init.lua'
	no file '/etc/xdg/xdg-awesome/awesome/ruled.lua'
	no file '/etc/xdg/xdg-awesome/awesome/ruled/init.lua'
	no file '/etc/xdg/awesome/ruled.lua'
	no file '/etc/xdg/awesome/ruled/init.lua'
	no file '/usr/local/share/awesome/lib/ruled.lua'
	no file '/usr/local/share/awesome/lib/ruled/init.lua'
	no file '/usr/local/lib/lua/5.3/ruled.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.3/ruled.so'
	no file '/usr/lib/lua/5.3/ruled.so'
	no file '/usr/local/lib/lua/5.3/loadall.so'
	no file './ruled.so'
	no file '/home/tamas/.config/awesome/ruled.so'
	no file '/etc/xdg/xdg-awesome/awesome/ruled.so'
	no file '/etc/xdg/awesome/ruled.so'
	no file '/usr/local/share/awesome/lib/ruled.so'

This is pretty hard to google, but it seems like this is a part of awesome that's removed/renamed in more recent versions. So what's the latest version (git SHA) of awesome that works with this config?

created time in 2 months

fork sztomi/cmake-dict

Dictionaries in CMake

fork in 2 months

issue commentrust-lang/rust

Tracking issue for RFC 2363, "Allow arbitrary enums to have explicit discriminants"

Being a rust newbie, I instinctively tried this and the compiler sent me to this issue. I see this is fairly old, but I'm not familiar with how quickly features make it into a stable version of the compiler. Is it possible to tell how far this feature is from stabilizing?

Centril

comment created time in 3 months

push eventsztomi/dotfiles

Tamás Szelei

commit sha 3e578f2ececde671b48f12692ef01b6b35849f49

freebsd: no need for openjdk

view details

push time in 3 months

issue commentopenssl/openssl

Invalid relocations when linking a static libcrypto to a shared object on Android armv8

@SalusaSecondus happy to release it with whatever license helps you get around such restrictions. By default, I usually release my stuff with the MIT license, so let's say it's that. Feel free to contact me via email if you need a different one, or a written permission or something (you can find my address in my fork in the commit I made). Corporations :man_facepalming:

sztomi

comment created time in 3 months

more