Discussion:
Macro %so has illegal name - why?
Toralf Lund
2008-05-22 08:30:40 UTC
Permalink
Just tried the following in an rpm spec file

%define so .so

When I tried building with this (rpmbuild -bb), I got

error: Macro %so has illegal name (%define)

Why? I mean, obviously rpmbuild didn't like my macro name, so I can just
change it to something else, but what exactly is wrong with it? What are
the rules? I this documented anywhere?

- Toralf
Valery Reznic
2008-05-22 08:37:20 UTC
Permalink
Subject: Macro %so has illegal name - why?
Date: Thursday, May 22, 2008, 11:30 AM
Just tried the following in an rpm spec file
%define so .so
When I tried building with this (rpmbuild -bb), I got
error: Macro %so has illegal name (%define)
Why? I mean, obviously rpmbuild didn't like my macro
name, so I can just
change it to something else, but what exactly is wrong with
it? What are
the rules? I this documented anywhere?
As long as I remember macro should be at least 3 character long.
Why - I have no idea.

Valery.
- Toralf
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Toralf Lund
2008-05-23 11:21:02 UTC
Permalink
Post by Valery Reznic
Subject: Macro %so has illegal name - why?
Date: Thursday, May 22, 2008, 11:30 AM
Just tried the following in an rpm spec file
%define so .so
When I tried building with this (rpmbuild -bb), I got
error: Macro %so has illegal name (%define) [ ... ]
As long as I remember macro should be at least 3 character long.
Why - I have no idea.
Right. You know, when I checked some of the docs again after you said
that, I found the following in /usr/share/doc/rpm-4.4.2/macros:

Name may be composed of alphanumeric characters, and the character
`_' and must be at least 3 characters in length.

Somehow I hadn't noticed this earlier...

Thanks,


- Toralf
Valery Reznic
2008-05-23 12:51:31 UTC
Permalink
Subject: Re: Macro %so has illegal name - why?
Date: Friday, May 23, 2008, 2:21 PM
--- On Thu, 5/22/08, Toralf Lund
Subject: Macro %so has illegal name - why?
To: "RPM Mailing List"
Date: Thursday, May 22, 2008, 11:30 AM
Just tried the following in an rpm spec file
%define so .so
When I tried building with this (rpmbuild -bb), I
got
error: Macro %so has illegal name (%define) [ ...
]
As long as I remember macro should be at least 3
character long.
Why - I have no idea.
Right. You know, when I checked some of the docs again
after you said
that, I found the following in
Name may be composed of alphanumeric characters, and
the character
`_' and must be at least 3 characters in length.
Somehow I hadn't noticed this earlier...
I hadn't noticed that too before I was bitten by it :)

Valery.
Thanks,
- Toralf
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Jeff Johnson
2008-05-23 12:26:46 UTC
Permalink
Post by Valery Reznic
As long as I remember macro should be at least 3 character long.
Why - I have no idea.
<3 character names are reserved so that rpm has an internal macro name
space that
cannot be changed in spec files.

73 de Jeff
Loading...